requestAnimationFrame Method

Summary

Requests an animation frame, with a fallback for older browsers.

Syntax
TypeScript
JavaScript
requestAnimationFrame = function( 
   callback 
) 
static requestAnimationFrame( 
   callback: LTRender 
): number; 

Parameters

callback

The callback of type LTRender to run when the frame is ready.

Return Value

An id used for cancelling.

Remarks

If SupportsAnimationFrame is true, RequestAnimationFrame and CancelAnimationFrame will be set to the browser-prefixed (if necessary) versions of window.requestAnimationFrame and window.cancelAnimationFrame, respectively.

If SupportsAnimationFrame is false, RequestAnimationFrame and CancelAnimationFrame will be set to window.setTimeout and window.clearTimeout, respectively.

Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.