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 $if DART2JS | 8 $if DART2JS |
9 $(ANNOTATIONS)@Native("Window,DOMWindow") | 9 $(ANNOTATIONS)@Native("Window,DOMWindow") |
10 $(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { | 10 $(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 * request. This value only needs to be saved if you intend to call | 108 * request. This value only needs to be saved if you intend to call |
109 * [cancelAnimationFrame] so you can specify the particular animation to | 109 * [cancelAnimationFrame] so you can specify the particular animation to |
110 * cancel. | 110 * cancel. |
111 * | 111 * |
112 * Note: The supplied [callback] needs to call [requestAnimationFrame] again | 112 * Note: The supplied [callback] needs to call [requestAnimationFrame] again |
113 * for the animation to continue. | 113 * for the animation to continue. |
114 */ | 114 */ |
115 @DomName('Window.requestAnimationFrame') | 115 @DomName('Window.requestAnimationFrame') |
116 int requestAnimationFrame(FrameRequestCallback callback) { | 116 int requestAnimationFrame(FrameRequestCallback callback) { |
117 _ensureRequestAnimationFrame(); | 117 _ensureRequestAnimationFrame(); |
118 return _requestAnimationFrame(_wrapZone/*<num, dynamic>*/(callback)); | 118 return _requestAnimationFrame(_wrapZone(callback)); |
119 } | 119 } |
120 | 120 |
121 /** | 121 /** |
122 * Cancels an animation frame request. | 122 * Cancels an animation frame request. |
123 * | 123 * |
124 * ## Other resources | 124 * ## Other resources |
125 * | 125 * |
126 * * [Window.cancelAnimationFrame](https://developer.mozilla.org/en-US/docs/We
b/API/Window.cancelAnimationFrame) | 126 * * [Window.cancelAnimationFrame](https://developer.mozilla.org/en-US/docs/We
b/API/Window.cancelAnimationFrame) |
127 * from MDN. | 127 * from MDN. |
128 */ | 128 */ |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 {bool useCapture: false}) { | 375 {bool useCapture: false}) { |
376 $if DART2JS | 376 $if DART2JS |
377 // Specify the generic type for _ElementEventStreamImpl only in dart2js to | 377 // Specify the generic type for _ElementEventStreamImpl only in dart2js to |
378 // avoid checked mode errors in dartium. | 378 // avoid checked mode errors in dartium. |
379 return new _ElementListEventStreamImpl<BeforeUnloadEvent>(e, _eventType, use
Capture); | 379 return new _ElementListEventStreamImpl<BeforeUnloadEvent>(e, _eventType, use
Capture); |
380 $else | 380 $else |
381 return new _ElementListEventStreamImpl(e, _eventType, useCapture); | 381 return new _ElementListEventStreamImpl(e, _eventType, useCapture); |
382 $endif | 382 $endif |
383 } | 383 } |
384 } | 384 } |
OLD | NEW |