The onmessageerror event handler of the MessagePort interface is an EventListener, called whenever an MessageEvent of type messageerror is fired on the port—that is, when it receives a message that cannot be deserialized.

Note: This feature is available in Web Workers.


port.onmessageerror = function() { ... };


Specification Status Comment
HTML Living Standard
The definition of 'onmessageerror' in that specification.
Living Standard  

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
onmessageerrorChrome Full support 60Edge Full support 18Firefox Full support 57IE No support NoOpera Full support 47Safari ? WebView Android Full support 60Chrome Android Full support 60Firefox Android Full support 57Opera Android Full support 44Safari iOS ? Samsung Internet Android Full support 8.0


Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also