Window: requestAnimationFrame() method - Web APIs | MDN
Skip to search
Window: requestAnimationFrame() method
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
See full compatibility
Report feedback
The
window.requestAnimationFrame()
method tells the
browser you wish to perform an animation. It requests the browser to call a
user-supplied callback function before the next repaint.
The frequency of calls to the callback function will generally match the display
refresh rate. The most common refresh rate is 60hz,
(60 cycles/frames per second), though 75hz, 120hz, and 144hz are also widely used.
requestAnimationFrame()
calls are paused in most browsers when running in
background tabs or hidden