W3cubDocs

/Web APIs

ErrorEvent: colno property

Note: This feature is available in Web Workers.

The colno read-only property of the ErrorEvent interface returns an integer containing the column number of the script file on which the error occurred.

Value

An integer.

Examples

window.addEventListener("error", (ev) => {
  console.log(`The error occur in column: ${ev.colno}`);
});

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet WebView Android WebView on iOS
colno 30 12 31 17 8 30 31 18 8 2.0 4.4 8

© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent/colno