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 $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 @DocsEditable() | 7 @DocsEditable() |
8 $(ANNOTATIONS)@Native("Window,DOMWindow") | 8 $(ANNOTATIONS)@Native("Window,DOMWindow") |
9 $(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { | 9 $(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 * request. This value only needs to be saved if you intend to call | 103 * request. This value only needs to be saved if you intend to call |
104 * [cancelAnimationFrame] so you can specify the particular animation to | 104 * [cancelAnimationFrame] so you can specify the particular animation to |
105 * cancel. | 105 * cancel. |
106 * | 106 * |
107 * Note: The supplied [callback] needs to call [requestAnimationFrame] again | 107 * Note: The supplied [callback] needs to call [requestAnimationFrame] again |
108 * for the animation to continue. | 108 * for the animation to continue. |
109 */ | 109 */ |
110 @DomName('Window.requestAnimationFrame') | 110 @DomName('Window.requestAnimationFrame') |
111 int requestAnimationFrame(FrameRequestCallback callback) { | 111 int requestAnimationFrame(FrameRequestCallback callback) { |
112 _ensureRequestAnimationFrame(); | 112 _ensureRequestAnimationFrame(); |
113 return _requestAnimationFrame(_wrapZone/*<num, dynamic>*/(callback)); | 113 return _requestAnimationFrame(_wrapZone(callback)); |
114 } | 114 } |
115 | 115 |
116 /** | 116 /** |
117 * Cancels an animation frame request. | 117 * Cancels an animation frame request. |
118 * | 118 * |
119 * ## Other resources | 119 * ## Other resources |
120 * | 120 * |
121 * * [Window.cancelAnimationFrame](https://developer.mozilla.org/en-US/docs/We
b/API/Window.cancelAnimationFrame) | 121 * * [Window.cancelAnimationFrame](https://developer.mozilla.org/en-US/docs/We
b/API/Window.cancelAnimationFrame) |
122 * from MDN. | 122 * from MDN. |
123 */ | 123 */ |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 // Specify the generic type for _ElementEventStreamImpl only in dart2js. | 312 // Specify the generic type for _ElementEventStreamImpl only in dart2js. |
313 return new _ElementEventStreamImpl<BeforeUnloadEvent>(e, _eventType, useCapt
ure); | 313 return new _ElementEventStreamImpl<BeforeUnloadEvent>(e, _eventType, useCapt
ure); |
314 } | 314 } |
315 | 315 |
316 ElementStream<BeforeUnloadEvent> _forElementList(ElementList e, | 316 ElementStream<BeforeUnloadEvent> _forElementList(ElementList e, |
317 {bool useCapture: false}) { | 317 {bool useCapture: false}) { |
318 // Specify the generic type for _ElementEventStreamImpl only in dart2js. | 318 // Specify the generic type for _ElementEventStreamImpl only in dart2js. |
319 return new _ElementListEventStreamImpl<BeforeUnloadEvent>(e, _eventType, use
Capture); | 319 return new _ElementListEventStreamImpl<BeforeUnloadEvent>(e, _eventType, use
Capture); |
320 } | 320 } |
321 } | 321 } |
OLD | NEW |