MDN self-hosted library · e01.org

ErrorEvent: colno property

HTML DOM

Open notebook · 1 cells web-api-instance-property upstream source

HTML DOM

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