nx.js
Functions

requestAnimationFrame

requestAnimationFrame(callback): number

Tells the application that you wish to perform an animation. The application will call the supplied callback function prior to the next repaint.

Parameters

ParameterTypeDescription
callbackFrameRequestCallbackThe function to call when it's time to update your animation for the next repaint.

Returns

number

The request ID, that uniquely identifies the entry in the callback list. You can pass this value to cancelAnimationFrame() to cancel the refresh callback request.

See

https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame

On this page