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

Unified Diff: sdk/lib/html/dartium/html_dartium.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
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 0459d733d2848f53478669f1166ff5c9f2b76573..58a7e278cec6b3eee012a7f335ee5ec51fa417f9 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -19102,10 +19102,19 @@ class Geoposition extends DartHtmlDomObject {
// 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"); }
@@ -37614,10 +37623,10 @@ class Url extends DartHtmlDomObject implements UrlUtils {
if ((blob_OR_source_OR_stream is Blob || blob_OR_source_OR_stream == null)) {
return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
}
- if ((blob_OR_source_OR_stream is MediaStream)) {
+ if ((blob_OR_source_OR_stream is MediaSource)) {
return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
}
- if ((blob_OR_source_OR_stream is MediaSource)) {
+ if ((blob_OR_source_OR_stream is MediaStream)) {
return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
}
throw new ArgumentError("Incorrect number or type of arguments");
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tools/dom/templates/html/impl/impl_GlobalEventHandlers.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698