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} |