ErrorEvent: message property
Note: This feature is available inWeb Workers.
Themessage read-only property of theErrorEvent interface returns a string containing a human-readable error message describing the problem.
In this article
Value
A string.
Examples
js
window.addEventListener("error", (ev) => { console.log(`The error message: ${ev.message}`);});Specifications
| Specification |
|---|
| HTML> # dom-errorevent-message> |