Globals API
chevron down

Globals API


This method cancels a previously requested animation frame callback.

cancelAnimationFrame(handle: number)


handle: number

The identifier of the request you want to cancel.


This method triggers an immediate screen update, and registers a callback to be invoked before painting this update. Note that the request expires after one frame. For continuous animations, another request should be made from within the first callback.

requestAnimationFrame(handler: (timestamp: number) => void)


handler: (timestamp: number) => void

A function to be executed before painting. The timestamp parameter indicates the time these callbacks began executing, in milliseconds. Multiple callbacks for the same frame receive the same timestamp value.