Index: lib/dom/templates/html/frog/impl_Window.darttemplate |
diff --git a/lib/dom/templates/html/frog/impl_Window.darttemplate b/lib/dom/templates/html/frog/impl_Window.darttemplate |
index 95d5abd910f315f546498bfa97f6afd98f4c5622..0b4095543f975d1fc4ef3b4ceb7ac227f3c1c176 100644 |
--- a/lib/dom/templates/html/frog/impl_Window.darttemplate |
+++ b/lib/dom/templates/html/frog/impl_Window.darttemplate |
@@ -10,5 +10,21 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS 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); }; |
vsm
2012/04/21 04:27:43
why 1000/60? a comment?
sra1
2012/04/24 18:57:09
Done.
|
+ } |
+ return window.requestAnimationFrame(callback); |
+'''; |
+ |
+ // Protect member 'requestAnimationFrame'. |
+ _requestAnimationFrame() native 'requestAnimationFrame'; |
+ |
$!MEMBERS |
} |