Notification:requireInteraction 属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
备注: 此特性在 Web Worker 中可用。
Notification
接口的 requireInteraction
只读属性返回一个布尔值,指示在用户点击或关闭通知前,通知应该保持活动状态,而不是自动关闭。
备注:
可以在创建通知时通过将 Notification.Notification()
构造方法的 requireInteraction
选项设置为 true
来进行设置。
值
一个布尔值。
规范
Specification |
---|
Notifications API # dom-notification-requireinteraction |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
requireInteraction |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- No support
- No support
- See implementation notes.
- User must explicitly enable this feature.
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.