[Webkit-unassigned] [Bug 21257] JS bindings should throw when too few arguments are passed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 4 06:36:59 PDT 2010


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





--- Comment #17 from Andreas Kling <andreas.kling at nokia.com>  2010-06-04 06:36:56 PST ---
(In reply to comment #16)
> For example, being able to leave out the third boolean parameter in addEventListener is great. We should maintain that.

While I appreciate the implications of making previously working code fail, I don't agree that we should maintain this.

Imagine a web developer using a WebKit-based browser as his main development platform. When he switches to another browser for compatibility testing and his code throws exceptions in "random" places, WebKit starts to look a bit too permissive.

I like what AP said about the engine helping the developer detect mistakes. So if we do take the route of making these arguments optional, I think we should at least emit some kind of "developer-only" warning when leaving them out.

-- 
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