BroadcastChannel.onmessageerror

位于 BroadcastChannel 接口上的 onmessageerror 事件处理程序,它是一个 事件监听器。当  BroadcastChannel 接收到一条无法 反序列化的消息时,会触发类型为 MessageErrorMessageEvent 事件,此时会执行该事件处理程序。

Note: 此特性在 Web Worker 中可用。

语法

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

规范

规范 状态 备注
HTML Living Standard
onmessageerror
Living Standard

浏览器兼容性

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

Legend

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

另见