isInputPending()
This feature is discouraged — The navigator.scheduling.isInputPending() method may incorrectly return false and is not the only case where you might expect to yield.
Consider using Scheduler API instead.
For more information, see: https://web.dev/articles/optimize-long-tasks#isinputpending
The navigator.scheduling.isInputPending() method checks if there are pending input events, such as touch or mouse events. This allows you to yield from long-running scripts that might be blocking user interaction.
Status
MDN documentation
Specifications
Browser support
- Chrome 87 Released on 2020-11-17
- Chrome Android 87 Released on 2020-11-17
- Edge 87 Released on 2020-11-19
- Firefox ❌
- Firefox for Android ❌
- Safari ❌
- Safari on iOS ❌
Web Platform Tests (WPT)
View the latest WPT test results for this featureView as JSON | Edit this feature | Report an issue | Web-features entry: source, dist