Function requestAnimationFrame

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

    Parameters

    • callback: FrameRequestCallback

      The 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.

Generated using TypeDoc