ErrorEvent:colno 属性
备注: 此特性在 Web Worker 中可用。
ErrorEvent
接口的 colno
只读属性返回一个整数,表示发生的错误在脚本文件中所位于的列号。
值
整数。
示例
js
window.addEventListener("error", (ev) => {
console.log("错误发生在第 " + ev.colno + " 列");
});
规范
Specification |
---|
HTML # dom-errorevent-colno |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
colno |
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.