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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 196473008: Mark addEventListeners as Unsupported when called for cross-frame window actions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months 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 | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tools/dom/src/dart2js_DOMImplementation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3cc7cd5c47e8b433f1f15063696c152a3b32233e..a698bd99523e40aa33afd15904ad152f685c8dbe 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -38770,6 +38770,21 @@ class _DOMWindowCrossFrame extends NativeFieldWrapperClass2 implements
// Implementation support.
String get typeName => "Window";
+
+ // TODO(efortuna): Remove this method. dartbug.com/16814
+ Events get on => throw new UnsupportedError(
+ 'You can only attach EventListeners to your own window.');
+ // TODO(efortuna): Remove this method. dartbug.com/16814
+ void addEventListener(String type, EventListener listener, [bool useCapture])
+ => throw new UnsupportedError(
+ 'You can only attach EventListeners to your own window.');
+ // TODO(efortuna): Remove this method. dartbug.com/16814
+ bool dispatchEvent(Event event) => throw new UnsupportedError(
+ 'You can only attach EventListeners to your own window.');
+ // TODO(efortuna): Remove this method. dartbug.com/16814
+ void removeEventListener(String type, EventListener listener,
+ [bool useCapture]) => throw new UnsupportedError(
+ 'You can only attach EventListeners to your own window.');
}
class _HistoryCrossFrame extends NativeFieldWrapperClass2 implements HistoryBase {
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tools/dom/src/dart2js_DOMImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698