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

Unified Diff: tools/dom/templates/html/impl/impl_GlobalEventHandlers.darttemplate

Issue 1437033002: Make GlobalEventHandlers not inherit from EventTarget (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Trying again Created 5 years, 1 month 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_GlobalEventHandlers.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_GlobalEventHandlers.darttemplate b/tools/dom/templates/html/impl/impl_GlobalEventHandlers.darttemplate
index d1b4f836fcd7cd859ea25a75c4519609cc18c5ce..af140f7778b826f108e7f1f13a2fa0d0f8bf641e 100644
--- a/tools/dom/templates/html/impl/impl_GlobalEventHandlers.darttemplate
+++ b/tools/dom/templates/html/impl/impl_GlobalEventHandlers.darttemplate
@@ -4,6 +4,15 @@
part of $LIBRARYNAME;
+// We implement EventTarget and have stubs for its methods because it's tricky to
+// convince the scripts to make our instance methods abstract, and the bodies that
+// get generated require `this` to be an EventTarget.
@DocsEditable()
-$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME extends EventTarget {
+$(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME implements EventTarget {
+
+ void addEventListener(String type, dynamic listener(Event event), [bool useCapture]);
+ bool dispatchEvent(Event event);
+ void removeEventListener(String type, dynamic listener(Event event), [bool useCapture]);
+ Events get on;
+
$!MEMBERS}
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698