This page has been flagged with the following issues:
Not part of user_timing, resource_timing, or navigation_timing interfaces.
A method to invoke at the optimal time a callback to update the frame of an animation
Method of dom/window
var handle = window.requestAnimationFrame(callback);
The animation code to be run when the system is ready.
Returns an object of type Number.
A handle or ID to the animationFrame request that can be used to cancel the request if needed.
Needs Examples: This section should include examples.
Unlike older animation techniques based on setTimeout and setInterval methods, requestAnimationFrame based animation occurs when the system is ready. This leads to smoother animations and less power consumption than animations because requestAnimationFrame takes the visibility of the web application and the refresh rate of the display into account, The requestAnimationFrame method creates only a single animation request. To create continous animation, a new request must be registered for each frame. To cancel an animation request before the animation function is called back, use cancelAnimationFrame.
|Timing control for script-based animations||W3C Working Draft|
|Feature||Chrome||Firefox (Gecko)||Internet Explorer||Opera||Safari|
|Basic Support|| 24
|Feature||Android||BlackBerry||Chrome for mobile||Firefox Mobile (Gecko)||IE Mobile||Opera Mobile||Opera Mini||Safari Mobile|
This article contains content originally from external sources.
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]