ErrorEvent: colno property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("HTML DOM")}}{{AvailableInWorkers}}

The **colno** read-only property of the {{domxref("ErrorEvent")}} interface returns an integer containing the column number of the script file on which the error occurred.

Value

An integer.

Examples

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

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}