Navigator:scheduling 属性
Deprecated
Avoid using this feature in new projects.
The navigator.scheduling.isInputPending() method may incorrectly return false and is not the only case where you might expect to yield.
This feature may be a candidate for removal from web standards or browsers.>
Consider using the following features instead: Scheduler API.>
Navigator 接口的 scheduling 只读属性返回当前文档的 Scheduling 对象,该对象提供了用于控制调度任务的方法和属性。
值
一个 Scheduling 对象。
示例
完整的示例请参阅 Scheduling.isInputPending() 页面。
规范
| 规范 |
|---|
| Early detection of input events> # dom-navigator-scheduling> |
浏览器兼容性
参见
- engineering.fb.com 上的 Facebook 在 2019 年对浏览器 API 的首次贡献(2019)
- developer.chrome.google.cn 上的使用 isInputPending() 改善 JS 调度(2020)
- web.developers.google.cn 上的优化耗时较长的任务(2022)