Skip to content

requestAnimationFrame ​

JS
    number requestAnimationFrame(function callback)

Requests an animation frame that executes the callback function before the next repaint.

Parameters

function callback: The callback function to execute.

Return Value:

number: Returns the request ID.