Notification:error 事件
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
备注: 此特性在 Web Worker 中可用。
Notification
接口的 error
事件在通知调用出错时候触发(在许多情况下,错误会阻止通知的显示)。
语法
在类似 addEventListener()
这样的方法中使用事件名称,或者设置事件处理器属性。
js
addEventListener("error", (event) => {});
onerror = (event) => {};
事件类型
一个通用的 Event
。
规范
Specification |
---|
Notifications API # dom-notification-onerror |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
error event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
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.