Creates an instance of "OnIdleScheduler".
Protected
_Indicates whether the scheduler is frozen.
Protected
allowIndicates whether the scheduler allows scheduling (scheduleCore() call) when it is already scheduled. This can be overridden in subclasses to change the default behavior.
Protected
callbackThe callback function to be executed by the scheduler.
Protected
idleA cross-browser handle for the scheduled idle callback. This is set to "null" when no idle callback is scheduled.
Protected
shouldIndicates whether the scheduler should be scheduled on unfreeze.
Indicates whether the scheduler is frozen.
Indicates whether the scheduler is currently scheduled.
Protected
isChecks if the scheduler is currently scheduled.
Cancels the scheduled callback.
Protected
cancelCancels the scheduled idle callback. If no idle callback is scheduled, it does nothing.
Protected
executeExecutes the callback immediately.
Freezes the scheduler, preventing it from executing the callback. If the scheduler is currently scheduled, it will be canceled and then rescheduled on unfreeze(). If the scheduler is already frozen, this method does nothing.
Schedules the callback to be executed. If the scheduler is already scheduled, it does nothing. If the scheduler is frozen, it will be scheduled on unfreeze().
Protected
scheduleSchedules the callback to be executed when the browser is idle. If an idle callback is already scheduled, it does nothing.
Unfreezes the scheduler, allowing it to execute the callback again. If the scheduler was frozen with a scheduled callback, it will be rescheduled. If schedule() was called while frozen, it will be scheduled now. If the scheduler is not frozen, this method does nothing.
Protected
Static
callCalls the provided callback function.
The callback function to be executed.
Static
singleSchedules a single-shot task using "requestIdleCallback"; if "requestIdleCallback" is not available, it uses "requestAnimationFrame".
The callback to be executed when the browser is idle.
Scheduler that uses the browser's "requestIdleCallback" to schedule tasks. If "requestIdleCallback" is not available, it falls back to "requestAnimationFrame".