Index: lib/html/frog/html_frog.dart |
diff --git a/lib/html/frog/html_frog.dart b/lib/html/frog/html_frog.dart |
index f8d7217e78ce99f46c41db63265b7c795180828a..526b641c6369c7882594066c284ada56b05d3b88 100644 |
--- a/lib/html/frog/html_frog.dart |
+++ b/lib/html/frog/html_frog.dart |
@@ -16256,6 +16256,22 @@ class _WindowImpl extends _EventTargetImpl implements Window native "@*DOMWindow |
_addMeasurementFrameCallback(callback); |
} |
+ /** @domName DOMWindow.requestAnimationFrame */ |
+ int requestAnimationFrame(RequestAnimationFrameCallback callback) native ''' |
+ if (!window.requestAnimationFrame) { |
+ window.requestAnimationFrame = |
+ window.webkitRequestAnimationFrame || |
+ window.mozRequestAnimationFrame || |
+ window.msRequestAnimationFrame || |
+ window.oRequestAnimationFrame || |
+ function (callback) { window.setTimeout(callback, 1000/60); }; |
+ } |
+ return window.requestAnimationFrame(callback); |
+'''; |
+ |
+ // Protect member 'requestAnimationFrame'. |
+ _requestAnimationFrame() native 'requestAnimationFrame'; |
+ |
_WindowEventsImpl get on() => |
new _WindowEventsImpl(this); |
@@ -34328,6 +34344,10 @@ interface Window extends EventTarget { |
void requestLayoutFrame(TimeoutHandler callback); |
+ /** @domName DOMWindow.webkitRequestAnimationFrame */ |
+ int requestAnimationFrame(RequestAnimationFrameCallback callback); |
+ |
+ |
/** |
* @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent |
*/ |