The messageerror
event is fired on a Window
object when it receives a message that can't be deserialized.
Bubbles | No |
---|---|
Cancelable | No |
Interface | MessageEvent |
Event handler property | onmessageerror |
Examples
Listen for messageerror
using addEventListener()
:
window.addEventListener('messageerror', (event) => { console.error(event); });
The same, but using the onmessageerror
event handler property:
window.onmessageerror = (event) => { console.error(event); };
Specifications
Specification | Status |
---|---|
HTML Living Standard | Living Standard |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
messageerror event | Chrome Full support 60 | Edge Full support ≤79 | Firefox Full support 57 | IE ? | Opera Full support 47 | Safari ? | WebView Android Full support 60 | Chrome Android Full support 60 | Firefox Android Full support 57 | Opera Android Full support 47 | Safari iOS ? | Samsung Internet Android Full support 8.0 |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown
See also
Window.postMessage()
- Related events:
message
.