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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

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:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"); }
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698