The function to execute during idle time
Optional options: IdleRequestOptionsOptional configuration (timeout in ms)
A handle that can be passed to cancelScheduledCallback
const handle = scheduleIdleCallback(() => {
console.log('Running during idle time');
});
// Later, if needed:
cancelScheduledCallback(handle);
Generated using TypeDoc
Safely schedules a callback to be executed when the browser is idle. Falls back to setTimeout if requestIdleCallback is not available.