Navigator: scheduling property
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The scheduling
read-only property of the Navigator
interface returns an Scheduling
object for the current document.
Value
An Scheduling
object.
Example
js
function executeTasks() {
const scheduling = navigator.scheduling;
const isInputPending = scheduling.isInputPending();
if (isInputPending) {
setTimeout(isInputPending, 0);
return;
}
// imagine `tasks` require more time to execution
tasks.forEach(() => task.execute());
}
Specifications
Specification |
---|
Early detection of input events # dom-navigator-scheduling |
Browser compatibility
BCD tables only load in the browser