From e7754b8a0961a10a33c34819dbded4147c8aa1cc Mon Sep 17 00:00:00 2001 From: MDN Date: Tue, 15 Feb 2022 01:01:01 +0000 Subject: [CRON] sync translated content --- .../web/api/broadcastchannel/onmessage/index.html | 55 ---------------------- .../api/broadcastchannel/onmessageerror/index.html | 45 ------------------ 2 files changed, 100 deletions(-) delete mode 100644 files/zh-cn/web/api/broadcastchannel/onmessage/index.html delete mode 100644 files/zh-cn/web/api/broadcastchannel/onmessageerror/index.html (limited to 'files/zh-cn/web') diff --git a/files/zh-cn/web/api/broadcastchannel/onmessage/index.html b/files/zh-cn/web/api/broadcastchannel/onmessage/index.html deleted file mode 100644 index ffea7d9825..0000000000 --- a/files/zh-cn/web/api/broadcastchannel/onmessage/index.html +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: BroadcastChannel.onmessage -slug: Web/API/BroadcastChannel/onmessage -translation_of: Web/API/BroadcastChannel/onmessage ---- -

{{APIRef("BroadCastChannel API")}}

- -

当 {{domxref("BroadcastChannel")}} 接收到类型为 {{domxref("MessageEvent")}} 的 {{event("message")}} 事件时,BroadcastChannel.onmessage 属性可以指定一个函数,作为该事件对应的事件处理程序来执行。

- -

{{AvailableInWorkers}}

- -

语法

- -
channel.onmessage = function;
-
- -

- - - -

示例

- -
bc.onmessage = function(ev) { console.log('message event received!'); };
-
- -

规范

- - - - - - - - - - - - - - -
规范状态备注
{{SpecName('HTML WHATWG', "comms.html#handler-broadcastchannel-onmessage", "BroadcastChannel.onmessage")}}{{Spec2('HTML WHATWG')}}Initial definition.
- -

浏览器兼容性

- - - -

{{Compat("api.BroadcastChannel.onmessage")}}

- -

另见

- - diff --git a/files/zh-cn/web/api/broadcastchannel/onmessageerror/index.html b/files/zh-cn/web/api/broadcastchannel/onmessageerror/index.html deleted file mode 100644 index 01c0e9ca2a..0000000000 --- a/files/zh-cn/web/api/broadcastchannel/onmessageerror/index.html +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: BroadcastChannel.onmessageerror -slug: Web/API/BroadcastChannel/onmessageerror -translation_of: Web/API/BroadcastChannel/onmessageerror ---- -
{{APIRef("HTML DOM")}}
- -

位于 {{domxref("BroadcastChannel")}} 接口上的 onmessageerror 事件处理程序,它是一个 {{domxref("EventListener", "事件监听器")}}。当  BroadcastChannel 接收到一条无法 {{glossary("Deserialization", "反序列化")}}的消息时,会触发类型为 {{domxref("MessageError")}} 的 {{domxref("MessageEvent")}} 事件,此时会执行该事件处理程序。

- -

{{AvailableInWorkers}}

- -

语法

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

规范

- - - - - - - - - - - - - - -
规范状态备注
{{SpecName('HTML WHATWG', '#handler-broadcastchannel-onmessageerror', 'onmessageerror')}}{{Spec2('HTML WHATWG')}}
- -

浏览器兼容性

- -
- - -

{{Compat("api.BroadcastChannel.onmessageerror")}}

-
- -

另见

- - -- cgit v1.2.3-54-g00ecf