Description[DeprecateAs] if call addEventListener or removeEventListener without enough arguments
No changes to behavior, other than adding a deprecation message.
Also, must run:
update_use_counter_feature_enum.py
in:
chromium/src/tools/metrics/histograms/
to update the UMA mapping.
This adds [DeprecateAs] to deprecated behavior, per suggestion of Tab:
https://codereview.chromium.org/329053002/#msg5
Also updates IDL (EventListener args are nullable).
For background, see:
Throw TypeError when addEventListener or removeEventListener are called without enough arguments
https://codereview.chromium.org/329053002/
Current behavior (not throwing a TypeError) was for compatibility in 2012.
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 we'd like to align with other browsers and spec, but not break legacy
content, hence a [DeprecateAs] to measure first.
R=haraken
BUG=353484
TEST=fast/dom/event-target-arguments.html
TEST=fast/dom/node-legacy-event-listener.html
TEST=fast/dom/Window/window-legacy-event-listener.html
TEST=fast/dom/XMLHttpRequest-legacy-event-listener.html
Patch Set 1 #Patch Set 2 : Move ext attr to interface #
Total comments: 2
Patch Set 3 : Revised, remove cleanup #Patch Set 4 : Fix typo #Patch Set 5 : Comment fix #Patch Set 6 : Test update/simplification #
Total comments: 4
Patch Set 7 : Fix counter #Patch Set 8 : Rebased #Patch Set 9 : Update use counter #Patch Set 10 : Fix template condition #Messages
Total messages: 22 (0 generated)
|