Chromium Code Reviews| 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, |