--- title: WindowEventHandlers.onmessageerror slug: Web/API/WindowEventHandlers/onmessageerror translation_of: Web/API/WindowEventHandlers/onmessageerror ---
{{domxref("WindowEventHandlers")}}接口的onmessageerror事件处理器是一个 {{domxref("EventListener")}},每当一个类型为 messageerror
的 {{domxref("EventListener")}} 事件在一个窗口被触发 --也就是说,当它收到的消息不能是{{glossary("Deserialization", "deserialized")}} 。
{{AvailableInWorkers}}
window.onmessageerror = function() { ... };
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', '#handler-window-onmessageerror', 'onmessageerror')}} | {{Spec2('HTML WHATWG')}} |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | {{CompatChrome(60)}} | {{CompatUnknown}} | {{CompatGeckoDesktop(57)}} | {{CompatUnknown}} | {{CompatOpera(47)}} | {{CompatUnknown}} |
Available in workers | {{CompatChrome(60)}} | {{CompatUnknown}} | {{CompatGeckoDesktop(57)}} | {{CompatUnknown}} | {{CompatOpera(47)}} | {{CompatUnknown}} |
Feature | Android Webview | Chrome for Android | Edge | Firefox Mobile (Gecko) | Firefox OS (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|---|
Basic support | {{CompatChrome(60)}} | {{CompatChrome(60)}} | {{CompatUnknown}} | {{CompatGeckoMobile(57)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatOpera(47)}} | {{CompatUnknown}} |
Available in workers | {{CompatChrome(60)}} | {{CompatChrome(60)}} | {{CompatUnknown}} | {{CompatGeckoMobile(57)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatOpera(47)}} | {{CompatUnknown}} |