Scheduling
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
TheScheduling object provides methods and properties to control scheduling tasks within the current document.
Warning:TheScheduling interface has been superseded by theScheduler interface, the features of which are better designed for addressing scheduling tasks. SeeDon't useisInputPending() for more details.
In this article
Instance methods
isInputPending()ExperimentalReturns a boolean that indicates whether there are pending input events in the event queue, meaning that the user is attempting to interact with the page.
Example
See theScheduling.isInputPending() page for a full example.
Specifications
| Specification |
|---|
| Early detection of input events> # the-scheduling-interface> |
Browser compatibility
See also
Schedulerinterface- Prioritized Task Scheduling API
- Faster input events with Facebook's first browser API contribution on engineering.fb.com (2019)
- Better JS scheduling with isInputPending() on developer.chrome.com (2020)
- Optimizing long tasks on web.dev (2022)