Prioritized Task Scheduling API
The Scheduling object provides methods and properties to control scheduling tasks within the current document.
[!WARNING] The
Schedulinginterface has been superseded by the Scheduler interface, the features of which are better designed for addressing scheduling tasks. See Don't useisInputPending()for more details.
Instance methods
- Scheduling.isInputPending
- : Returns 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 the Scheduling.isInputPending() page for a full example.
Specifications
Browser compatibility
See also
- Scheduler interface
- 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)
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
