web api instance property
ErrorEvent: error property
Available in workers
The error read-only property of the ErrorEvent interface returns a JavaScript value, such as an Error or DOMException, representing the error associated with this event.
Value
Any valid JavaScript value.
Examples
window.addEventListener("error", (ev) => {
console.log(`The error instance: ${ev.error}`);
});
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.