Worker:error 事件
Worker
接口的 error
事件会在 worker 发生错误时触发。
语法
在如 addEventListener()
等方法中使用事件名称,或者使用事件处理器属性。
js
addEventListener("error", (event) => {});
onerror = (event) => {};
事件类型
通用的 Event
。
示例
规范
Specification |
---|
HTML # handler-abstractworker-onerror |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
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.