DescriptionThrow TypeError when addEventListener or removeEventListener are called without enough arguments
** Changes web-facing behavior **
This removes legacy behavior, per request of Tab:
it fixes some current compatibility problems which *are* causing pain,
but potentially breaks some old content.
Current behavior (not throwing a TypeError) was for compatibility in 2012,
though unspecified cause:
WebKit bug specifically special-casing this in JavaScriptCore bindings is:
[JSC] Regression: addEventListener() and removeEventListener() raise an exception on missing args
https://bugs.webkit.org/show_bug.cgi?id=85928
WebKit/Safari also has legacy behavior (matches current Blink/Chrome):
"For compatibility with legacy content, the EventListener calls are generated without GenerateArgumentsCountCheck."
http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm#L2823
However, IE and Firefox *do* throw (correctly), and this discrepancy is causing
compatibility problems:
removeEventListener with only one passed parameter...
http://lists.w3.org/Archives/Public/public-script-coord/2014AprJun/0166.html
Thus this CL aligns with spec, updating tests and removing legacy tests.
R=haraken
BUG=353484
TEST=fast/dom/event-target-arguments.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176746
Patch Set 1 #Patch Set 2 : Update test, doc/FIXME updates #Patch Set 3 : Rebased off [DeprecateAs] CL #Patch Set 4 : Rebased #Patch Set 5 : Rebase off master #Patch Set 6 : Rebased #Messages
Total messages: 27 (0 generated)
|