ErrorEvent:message 属性
备注: 此特性在 Web Worker 中可用。
ErrorEvent
接口的 message
只读属性返回包含描述问题的人类可读的错误信息。
值
字符串。
示例
js
window.addEventListener("error", (ev) => {
console.log("错误消息:" + ev.message);
});
规范
Specification |
---|
HTML # dom-errorevent-message |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
message |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full 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.