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

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

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/core.gypi ('k') | Source/core/events/EventTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/EventTarget.h
diff --git a/Source/core/events/EventTarget.h b/Source/core/events/EventTarget.h
index f6fa122d8b0d229438813ec2e495249d2b19409f..c1bf895d476ccdb61ed82d4813e756a1f37781ca 100644
--- a/Source/core/events/EventTarget.h
+++ b/Source/core/events/EventTarget.h
@@ -107,7 +107,14 @@ public:
virtual DOMWindow* toDOMWindow();
virtual MessagePort* toMessagePort();
+ // FIXME: first 2 args to addEventListener and removeEventListener should
+ // be required (per spec), but throwing TypeError breaks legacy content.
+ // http://crbug.com/353484
+ bool addEventListener() { return false; }
+ bool addEventListener(const AtomicString& eventType) { return false; }
virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture = false);
+ bool removeEventListener() { return false; }
+ bool removeEventListener(const AtomicString& eventType) { return false; }
virtual bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture = false);
virtual void removeAllEventListeners();
virtual bool dispatchEvent(PassRefPtr<Event>);
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/events/EventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698