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

Unified Diff: lib/html/src/frog_DOMImplementation.dart

Issue 10601003: Enable cross frame window operations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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:
View side-by-side diff with in-line comments
Download patch
Index: lib/html/src/frog_DOMImplementation.dart
diff --git a/lib/html/src/frog_DOMImplementation.dart b/lib/html/src/frog_DOMImplementation.dart
index 63dc3ae2688498cb3031fe77e5bdc4e1d22b5e3d..ed76f1e93757a45e6251ea5edbb4a3ffb60b7446 100644
--- a/lib/html/src/frog_DOMImplementation.dart
+++ b/lib/html/src/frog_DOMImplementation.dart
@@ -10,18 +10,30 @@ class _DOMWindowCrossFrameImpl implements Window {
// Fields.
// TODO(vsm): Implement history and location getters.
- bool get closed() => _window.closed;
- int get length() => _window.length;
- Window get opener() => _createSafe(_window.opener);
- Window get parent() => _createSafe(_window.parent);
- Window get top() => _createSafe(_window.top);
+ bool get closed() => _closed(_window);
+ static bool _closed(win) native "return win.closed;";
+
+ bool get length() => _length(_window);
sra1 2012/06/21 16:18:01 Since there is no indexer, there is no point to le
+ static bool _length(win) native "return win.length;";
+
+ Window get opener() => _createSafe(_opener(_window));
+ static Window _opener(win) native "return win.opener;";
+
+ Window get parent() => _createSafe(_parent(_window));
+ static Window _parent(win) native "return win.parent;";
+
+ Window get top() => _createSafe(_top(_window));
+ static Window _top(win) native "return win.top;";
// Methods.
- void focus() => _window.focus();
+ void focus() => _focus(_window);
+ static void _focus(win) native "win.focus()";
- void blur() => _window.blur();
+ void blur() => _blur(_window);
+ static void _blur(win) native "win.blur()";
- void close() => _window.close();
+ void close() => _close(_window);
+ static void _close(win) native "win.close()";
void postMessage(Dynamic message,
String targetOrigin,

Powered by Google App Engine
This is Rietveld 408576698