| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of html; | 5 part of html; |
| 6 | 6 |
| 7 /// @domName $DOMNAME | 7 @DomName('$DOMNAME') |
| 8 class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" { | 8 class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" { |
| 9 | 9 |
| 10 Document get document => JS('Document', '#.document', this); | 10 Document get document => JS('Document', '#.document', this); |
| 11 | 11 |
| 12 WindowBase _open2(url, name) => JS('Window', '#.open(#,#)', this, url, name); | 12 WindowBase _open2(url, name) => JS('Window', '#.open(#,#)', this, url, name); |
| 13 | 13 |
| 14 WindowBase _open3(url, name, options) => | 14 WindowBase _open3(url, name, options) => |
| 15 JS('Window', '#.open(#,#,#)', this, url, name, options); | 15 JS('Window', '#.open(#,#,#)', this, url, name, options); |
| 16 | 16 |
| 17 WindowBase open(String url, String name, [String options]) { | 17 WindowBase open(String url, String name, [String options]) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * Executes a [callback] after the next batch of browser layout measurements | 75 * Executes a [callback] after the next batch of browser layout measurements |
| 76 * has completed or would have completed if any browser layout measurements | 76 * has completed or would have completed if any browser layout measurements |
| 77 * had been scheduled. | 77 * had been scheduled. |
| 78 */ | 78 */ |
| 79 void requestLayoutFrame(TimeoutHandler callback) { | 79 void requestLayoutFrame(TimeoutHandler callback) { |
| 80 _addMeasurementFrameCallback(callback); | 80 _addMeasurementFrameCallback(callback); |
| 81 } | 81 } |
| 82 | 82 |
| 83 /** @domName DOMWindow.requestAnimationFrame */ | 83 @DomName('DOMWindow.requestAnimationFrame') |
| 84 int requestAnimationFrame(RequestAnimationFrameCallback callback) { | 84 int requestAnimationFrame(RequestAnimationFrameCallback callback) { |
| 85 _ensureRequestAnimationFrame(); | 85 _ensureRequestAnimationFrame(); |
| 86 return _requestAnimationFrame(callback); | 86 return _requestAnimationFrame(callback); |
| 87 } | 87 } |
| 88 | 88 |
| 89 void cancelAnimationFrame(id) { | 89 void cancelAnimationFrame(id) { |
| 90 _ensureRequestAnimationFrame(); | 90 _ensureRequestAnimationFrame(); |
| 91 _cancelAnimationFrame(id); | 91 _cancelAnimationFrame(id); |
| 92 } | 92 } |
| 93 | 93 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 /** | 150 /** |
| 151 * Register a [port] on this window under the given [name]. This | 151 * Register a [port] on this window under the given [name]. This |
| 152 * port may be retrieved by any isolate (or JavaScript script) | 152 * port may be retrieved by any isolate (or JavaScript script) |
| 153 * running in this window. | 153 * running in this window. |
| 154 */ | 154 */ |
| 155 void registerPort(String name, var port) { | 155 void registerPort(String name, var port) { |
| 156 var serialized = _serialize(port); | 156 var serialized = _serialize(port); |
| 157 document.documentElement.attributes['dart-port:$name'] = json.stringify(seri
alized); | 157 document.documentElement.attributes['dart-port:$name'] = json.stringify(seri
alized); |
| 158 } | 158 } |
| 159 | 159 |
| 160 /// @domName Window.console; @docsEditable true | 160 /// @docsEditable true |
| 161 @DomName('Window.console') |
| 161 Console get console => Console.safeConsole; | 162 Console get console => Console.safeConsole; |
| 162 | 163 |
| 163 $!MEMBERS | 164 $!MEMBERS |
| 164 } | 165 } |
| OLD | NEW |