Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(747)

Unified Diff: Source/core/events/EventTarget.idl

Issue 203603005: Explicitly mark first 2 args of addEventListener/removeEventListener as optional (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update test result (addEventListener.length now 0, not 2) Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/events/EventTarget.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/EventTarget.idl
diff --git a/Source/core/events/EventTarget.idl b/Source/core/events/EventTarget.idl
index 7febedfcedc843658d302a0918b9c8853da896d5..26ceb1b3573d9b4a877efb3c43d6c352d636f3fc 100644
--- a/Source/core/events/EventTarget.idl
+++ b/Source/core/events/EventTarget.idl
@@ -21,11 +21,13 @@
[
Custom=ToV8,
] interface EventTarget {
- void addEventListener([TreatNullAs=NullString] DOMString type,
- EventListener listener,
+ // FIXME: first 2 args should be required, but throwing TypeError breaks
+ // legacy content. http://crbug.com/353484
+ void addEventListener([TreatNullAs=NullString] optional DOMString type,
+ optional EventListener listener,
optional boolean useCapture);
- void removeEventListener([TreatNullAs=NullString] DOMString type,
- EventListener listener,
+ void removeEventListener([TreatNullAs=NullString] optional DOMString type,
+ optional EventListener listener,
optional boolean useCapture);
[RaisesException] boolean dispatchEvent(Event event);
};
« no previous file with comments | « Source/core/events/EventTarget.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698