Index: sdk/lib/html/dart2js/html_dart2js.dart |
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart |
index b0e17b3455dee7c9526f96cc16c4922dedc90bf8..5ed46aaec36bd4d5098076a19e67f734e7edd19b 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -17095,10 +17095,19 @@ class Geoposition extends Interceptor { |
// BSD-style license that can be found in the LICENSE file. |
+// 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() |
@DomName('GlobalEventHandlers') |
@Experimental() // untriaged |
-abstract class GlobalEventHandlers extends EventTarget { |
+abstract class GlobalEventHandlers 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; |
+ |
// To suppress missing implicit constructor warnings. |
factory GlobalEventHandlers._() { throw new UnsupportedError("Not supported"); } |