Skip to main content

Function: getBrowserRequestIdleCallback()

function getBrowserRequestIdleCallback():
| ((callback: IdleRequestCallback, options?: IdleRequestOptions) => number)
| undefined;

Defined in: utils/runtime/browserRuntime.ts:432

Returns​

Function​

(callback: IdleRequestCallback, options?: IdleRequestOptions) => number;

The window.requestIdleCallback() method queues a function to be called during a browser's idle periods. This enables developers to perform background and low priority work on the main thread, without impacting latency-critical events such as animation and input response. Functions are generally called in first-in-first-out order; however, callbacks which have a timeout specified may be called out-of-order if necessary in order to run them before the timeout elapses.

MDN Reference

Parameters​

callback​

IdleRequestCallback

options?​

IdleRequestOptions

Returns​

number


undefined