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

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

Issue 329223004: [DeprecateAs] if call addEventListener or removeEventListener without enough arguments Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move ext attr to interface Created 6 years, 6 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
Index: Source/core/events/EventTarget.idl
diff --git a/Source/core/events/EventTarget.idl b/Source/core/events/EventTarget.idl
index 69a4bc18d7b6e8986ae9c3dbe76371cd5ae3ba73..fba803388131125e16bfd2b56213d37c0c46bae9 100644
--- a/Source/core/events/EventTarget.idl
+++ b/Source/core/events/EventTarget.idl
@@ -18,17 +18,28 @@
* Boston, MA 02110-1301, USA.
*/
+// http://dom.spec.whatwg.org/#interface-eventtarget
+
[
+ CheckSecurity=Window,
Custom=ToV8,
WillBeGarbageCollected,
] interface EventTarget {
// 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,
+ // legacy content, so [DeprecateAs] and measure. http://crbug.com/353484
+ [DeprecateAs=EventTargetMissingArgs] void addEventListener(
+ [TreatNullAs=NullString] optional DOMString type);
+ void addEventListener([TreatNullAs=NullString] DOMString type,
+ EventListener? listener,
+ // FIXME: should be useCapture = false
+ // http://crbug.com/258153
optional boolean useCapture);
- void removeEventListener([TreatNullAs=NullString] optional DOMString type,
- optional EventListener listener,
+ [DeprecateAs=EventTargetMissingArgs] void removeEventListener(
+ [TreatNullAs=NullString] optional DOMString type);
+ void removeEventListener([TreatNullAs=NullString] DOMString type,
+ EventListener? listener,
+ // FIXME: should be useCapture = false
+ // http://crbug.com/258153
optional boolean useCapture);
[RaisesException] boolean dispatchEvent(Event event);
};

Powered by Google App Engine
This is Rietveld 408576698