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 --- files/zh-cn/_redirects.txt | 2 + files/zh-cn/_wikihistory.json | 24 +++++----- .../api/broadcastchannel/message_event/index.html | 56 ++++++++++++++++++++++ .../broadcastchannel/messageerror_event/index.html | 46 ++++++++++++++++++ .../web/api/broadcastchannel/onmessage/index.html | 55 --------------------- .../api/broadcastchannel/onmessageerror/index.html | 45 ----------------- 6 files changed, 116 insertions(+), 112 deletions(-) create mode 100644 files/zh-cn/conflicting/web/api/broadcastchannel/message_event/index.html create mode 100644 files/zh-cn/conflicting/web/api/broadcastchannel/messageerror_event/index.html 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') diff --git a/files/zh-cn/_redirects.txt b/files/zh-cn/_redirects.txt index b1214b6ed1..b348f3966c 100644 --- a/files/zh-cn/_redirects.txt +++ b/files/zh-cn/_redirects.txt @@ -1240,6 +1240,8 @@ /zh-CN/docs/Web/API/Blob.size /zh-CN/docs/Web/API/Blob/size /zh-CN/docs/Web/API/Blob.slice /zh-CN/docs/Web/API/Blob/slice /zh-CN/docs/Web/API/Blob.type /zh-CN/docs/Web/API/Blob/type +/zh-CN/docs/Web/API/BroadcastChannel/onmessage /zh-CN/docs/conflicting/Web/API/BroadcastChannel/message_event +/zh-CN/docs/Web/API/BroadcastChannel/onmessageerror /zh-CN/docs/conflicting/Web/API/BroadcastChannel/messageerror_event /zh-CN/docs/Web/API/ByteString /zh-CN/docs/conflicting/Web/JavaScript/Reference/Global_Objects/String /zh-CN/docs/Web/API/CSSStyleSheet.insertRule /zh-CN/docs/Web/API/CSSStyleSheet/insertRule /zh-CN/docs/Web/API/CSS分页规则 /zh-CN/docs/Web/API/CSSPageRule diff --git a/files/zh-cn/_wikihistory.json b/files/zh-cn/_wikihistory.json index 6de70e3d52..5a3f634ea5 100644 --- a/files/zh-cn/_wikihistory.json +++ b/files/zh-cn/_wikihistory.json @@ -8217,18 +8217,6 @@ "Spikef" ] }, - "Web/API/BroadcastChannel/onmessage": { - "modified": "2020-10-15T22:26:22.393Z", - "contributors": [ - "Spikef" - ] - }, - "Web/API/BroadcastChannel/onmessageerror": { - "modified": "2020-10-15T22:26:22.343Z", - "contributors": [ - "Spikef" - ] - }, "Web/API/BroadcastChannel/postMessage": { "modified": "2020-10-15T22:26:23.239Z", "contributors": [ @@ -46795,6 +46783,18 @@ "levo2165" ] }, + "conflicting/Web/API/BroadcastChannel/message_event": { + "modified": "2020-10-15T22:26:22.393Z", + "contributors": [ + "Spikef" + ] + }, + "conflicting/Web/API/BroadcastChannel/messageerror_event": { + "modified": "2020-10-15T22:26:22.343Z", + "contributors": [ + "Spikef" + ] + }, "conflicting/Web/API/Canvas_API/Tutorial": { "modified": "2019-03-23T23:20:14.159Z", "contributors": [ diff --git a/files/zh-cn/conflicting/web/api/broadcastchannel/message_event/index.html b/files/zh-cn/conflicting/web/api/broadcastchannel/message_event/index.html new file mode 100644 index 0000000000..c5475fd880 --- /dev/null +++ b/files/zh-cn/conflicting/web/api/broadcastchannel/message_event/index.html @@ -0,0 +1,56 @@ +--- +title: BroadcastChannel.onmessage +slug: conflicting/Web/API/BroadcastChannel/message_event +translation_of: Web/API/BroadcastChannel/onmessage +original_slug: 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/conflicting/web/api/broadcastchannel/messageerror_event/index.html b/files/zh-cn/conflicting/web/api/broadcastchannel/messageerror_event/index.html new file mode 100644 index 0000000000..a87c54522e --- /dev/null +++ b/files/zh-cn/conflicting/web/api/broadcastchannel/messageerror_event/index.html @@ -0,0 +1,46 @@ +--- +title: BroadcastChannel.onmessageerror +slug: conflicting/Web/API/BroadcastChannel/messageerror_event +translation_of: Web/API/BroadcastChannel/onmessageerror +original_slug: 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")}}

+
+ +

另见

+ + 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