[Webkit-unassigned] [Bug 83993] Unsupported commands in execCommand/queryCommand* should throw except queryCommandSupported

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 19 08:02:51 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=83993





--- Comment #23 from Alexey Proskuryakov <ap at webkit.org>  2012-04-19 08:02:51 PST ---
> On the other hand, most DOM methods throw if given invalid input, such as: insertBefore, appendChild, replaceChild, removeChild, querySelector(All), splitText, (substring|insert|delete|replace)Data, (extract|clone)Contents, insertNode, surroundContents, isPointInRange, comparePoint, . . .

What I see as a subtle, but conceptual difference is that exceptions in these cases are always indication of a programming mistake, not a side channel to inform developer of browser limitations.

> And yes, we do want to introduce new commands that aren't reasonably ignorable -- e.g., fontSizePt <https://www.w3.org/Bugs/Public/show_bug.cgi?id=14253>.

The consequence of ignoring this command is that font size won't change, which may or may not be important to the user, and should be caught in testing if it's a feature important to the developer. Using a wrong font size is superior to being completely broken due to uncaught exception.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list