From ba8d3f6f9d418e3b7fdfe79ccfb6e7a6ffb7f566 Mon Sep 17 00:00:00 2001 From: MDN Date: Sat, 12 Mar 2022 00:12:34 +0000 Subject: [CRON] sync translated content --- files/zh-cn/_redirects.txt | 7 ++- files/zh-cn/_wikihistory.json | 18 +++---- files/zh-cn/conflicting/web/html/index.html | 10 ++++ .../web/api/eventsource/error_event/index.html | 56 +++++++++++++++++++++ files/zh-cn/web/api/eventsource/onerror/index.html | 56 --------------------- files/zh-cn/web/api/eventsource/onopen/index.html | 57 ---------------------- .../web/api/eventsource/open_event/index.html | 57 ++++++++++++++++++++++ files/zh-cn/web/html/index/index.html | 9 ---- 8 files changed, 137 insertions(+), 133 deletions(-) create mode 100644 files/zh-cn/conflicting/web/html/index.html create mode 100644 files/zh-cn/web/api/eventsource/error_event/index.html delete mode 100644 files/zh-cn/web/api/eventsource/onerror/index.html delete mode 100644 files/zh-cn/web/api/eventsource/onopen/index.html create mode 100644 files/zh-cn/web/api/eventsource/open_event/index.html delete mode 100644 files/zh-cn/web/html/index/index.html (limited to 'files/zh-cn') diff --git a/files/zh-cn/_redirects.txt b/files/zh-cn/_redirects.txt index 5724992b1b..73596ab89d 100644 --- a/files/zh-cn/_redirects.txt +++ b/files/zh-cn/_redirects.txt @@ -1191,8 +1191,8 @@ /zh-CN/docs/Server-sent_events/EventSource /zh-CN/docs/Web/API/EventSource /zh-CN/docs/Server-sent_events/EventSource/EventSource /zh-CN/docs/Web/API/EventSource/EventSource /zh-CN/docs/Server-sent_events/EventSource/close /zh-CN/docs/Web/API/EventSource/close -/zh-CN/docs/Server-sent_events/EventSource/onerror /zh-CN/docs/Web/API/EventSource/onerror -/zh-CN/docs/Server-sent_events/EventSource/onopen /zh-CN/docs/Web/API/EventSource/onopen +/zh-CN/docs/Server-sent_events/EventSource/onerror /zh-CN/docs/Web/API/EventSource/error_event +/zh-CN/docs/Server-sent_events/EventSource/onopen /zh-CN/docs/Web/API/EventSource/open_event /zh-CN/docs/Server-sent_events/Using_server-sent_events /zh-CN/docs/Web/API/Server-sent_events/Using_server-sent_events /zh-CN/docs/Site_Compatibility_for_Firefox_19 /zh-CN/docs/Mozilla/Firefox/Releases/19/Site_compatibility /zh-CN/docs/Site_Compatibility_for_Firefox_21 /zh-CN/docs/Mozilla/Firefox/Releases/21/Site_compatibility @@ -1333,6 +1333,8 @@ /zh-CN/docs/Web/API/Event/isChar /zh-CN/docs/Web/API/UIEvent/isChar /zh-CN/docs/Web/API/Event/pageY /zh-CN/docs/conflicting/Web/API/MouseEvent/pageY /zh-CN/docs/Web/API/Event/禁用时间冒泡 /zh-CN/docs/Web/API/Event/cancelBubble +/zh-CN/docs/Web/API/EventSource/onerror /zh-CN/docs/Web/API/EventSource/error_event +/zh-CN/docs/Web/API/EventSource/onopen /zh-CN/docs/Web/API/EventSource/open_event /zh-CN/docs/Web/API/EventTarget.dispatchEvent /zh-CN/docs/Web/API/EventTarget/dispatchEvent /zh-CN/docs/Web/API/EventTarget.removeEventListener /zh-CN/docs/Web/API/EventTarget/removeEventListener /zh-CN/docs/Web/API/FetchController /zh-CN/docs/Web/API/AbortController @@ -2014,6 +2016,7 @@ /zh-CN/docs/Web/HTML/Global_attributes/x-ms-加速装置键 /zh-CN/docs/Web/HTML/Global_attributes/x-ms-acceleratorkey /zh-CN/docs/Web/HTML/Global_attributes/x-ms-格式-检测 /zh-CN/docs/Web/HTML/Global_attributes/x-ms-format-detection /zh-CN/docs/Web/HTML/Global_attributes/摩缺 /zh-CN/docs/Web/HTML/Global_attributes/accesskey +/zh-CN/docs/Web/HTML/Index /zh-CN/docs/conflicting/Web/HTML /zh-CN/docs/Web/HTML/Inline_elemente /zh-CN/docs/Web/HTML/Inline_elements /zh-CN/docs/Web/HTML/Introduction /zh-CN/docs/learn/HTML/Introduction_to_HTML /zh-CN/docs/Web/HTML/Optimizing_your_pages_for_speculative_parsing /zh-CN/docs/Glossary/speculative_parsing diff --git a/files/zh-cn/_wikihistory.json b/files/zh-cn/_wikihistory.json index 81df0cfbad..3fd874797f 100644 --- a/files/zh-cn/_wikihistory.json +++ b/files/zh-cn/_wikihistory.json @@ -12997,13 +12997,13 @@ "Char-Ten" ] }, - "Web/API/EventSource/onerror": { + "Web/API/EventSource/error_event": { "modified": "2019-03-23T22:09:23.181Z", "contributors": [ "Char-Ten" ] }, - "Web/API/EventSource/onopen": { + "Web/API/EventSource/open_event": { "modified": "2019-03-23T22:16:16.621Z", "contributors": [ "kameii" @@ -32750,13 +32750,6 @@ "pans9" ] }, - "Web/HTML/Index": { - "modified": "2019-03-21T11:52:09.419Z", - "contributors": [ - "RainSlide", - "xcffl" - ] - }, "Web/HTML/Inline_elements": { "modified": "2020-08-05T19:04:54.777Z", "contributors": [ @@ -47559,6 +47552,13 @@ "wbamberg" ] }, + "conflicting/Web/HTML": { + "modified": "2019-03-21T11:52:09.419Z", + "contributors": [ + "RainSlide", + "xcffl" + ] + }, "conflicting/Web/HTML/Element": { "modified": "2020-01-10T02:18:08.432Z", "contributors": [ diff --git a/files/zh-cn/conflicting/web/html/index.html b/files/zh-cn/conflicting/web/html/index.html new file mode 100644 index 0000000000..0329d96704 --- /dev/null +++ b/files/zh-cn/conflicting/web/html/index.html @@ -0,0 +1,10 @@ +--- +title: HTML 文档索引 +slug: conflicting/Web/HTML +tags: + - HTML + - 索引 +translation_of: Web/HTML/Index +original_slug: Web/HTML/Index +--- +

{{Index("/zh-CN/docs/Web/HTML")}} 所有可用的 HTML 文档的综合索引列表。

diff --git a/files/zh-cn/web/api/eventsource/error_event/index.html b/files/zh-cn/web/api/eventsource/error_event/index.html new file mode 100644 index 0000000000..eb69418af9 --- /dev/null +++ b/files/zh-cn/web/api/eventsource/error_event/index.html @@ -0,0 +1,56 @@ +--- +title: EventSource.onerror +slug: Web/API/EventSource/error_event +translation_of: Web/API/EventSource/onerror +original_slug: Web/API/EventSource/onerror +--- +
{{APIRef('WebSockets API')}}
+ +
 
+ + +

{{domxref("EventSource")}} 的属性 onerror 是当发生错误且这个错误事件({{event("error")}} )被EventSource触发时调用的一个事件处理函数({{event("Event_handlers", "event handler")}})

+ +

语法

+ +
eventSource.onerror = function
+ +

例子

+ +
evtSource.onerror = function() {
+  console.log("EventSource failed.");
+};
+ +
+

Note: 你可以在Github上查看这个完整例子: Simple SSE demo using PHP.

+
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', "comms.html#handler-eventsource-onerror", "onerror")}}{{Spec2('HTML WHATWG')}}Initial definition
+ + + +

浏览器兼容性

+ +{{Compat("api.EventSource.onerror")}} + +

相关链接

+ + diff --git a/files/zh-cn/web/api/eventsource/onerror/index.html b/files/zh-cn/web/api/eventsource/onerror/index.html deleted file mode 100644 index 991d194795..0000000000 --- a/files/zh-cn/web/api/eventsource/onerror/index.html +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: EventSource.onerror -slug: Web/API/EventSource/onerror -translation_of: Web/API/EventSource/onerror -original_slug: Server-sent_events/EventSource/onerror ---- -
{{APIRef('WebSockets API')}}
- -
 
- - -

{{domxref("EventSource")}} 的属性 onerror 是当发生错误且这个错误事件({{event("error")}} )被EventSource触发时调用的一个事件处理函数({{event("Event_handlers", "event handler")}})

- -

语法

- -
eventSource.onerror = function
- -

例子

- -
evtSource.onerror = function() {
-  console.log("EventSource failed.");
-};
- -
-

Note: 你可以在Github上查看这个完整例子: Simple SSE demo using PHP.

-
- -

规范

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', "comms.html#handler-eventsource-onerror", "onerror")}}{{Spec2('HTML WHATWG')}}Initial definition
- - - -

浏览器兼容性

- -{{Compat("api.EventSource.onerror")}} - -

相关链接

- - diff --git a/files/zh-cn/web/api/eventsource/onopen/index.html b/files/zh-cn/web/api/eventsource/onopen/index.html deleted file mode 100644 index 20ca54d1f4..0000000000 --- a/files/zh-cn/web/api/eventsource/onopen/index.html +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: EventSource.onopen -slug: Web/API/EventSource/onopen -tags: - - API - - Event Handler - - EventSource -translation_of: Web/API/EventSource/onopen -original_slug: Server-sent_events/EventSource/onopen ---- -
{{APIRef('WebSockets API')}}
- -

{{domxref("EventSource")}}接口的 onopen 属性是一个 {{event("Event_handlers", "event handler")}} ,它在收到{{event("open")}} 事件时被调用,在那时,连接刚被打开。

- -

语法

- -
eventSource.onopen = function
- -

示例

- -
evtSource.onopen = function() {
-  console.log("Connection to server opened.");
-};
- -
-

注意 :你可以在 GitHub 上看到一个完整的示例— 请看 使用php的SSE(服务器发送事件)demo。

-
- -

规范

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', "comms.html#handler-eventsource-onopen", "onopen")}}{{Spec2('HTML WHATWG')}}Initial definition
- - - -

浏览器兼容性

- -{{Compat("api.EventSource.onopen")}} - -

相关链接

- - diff --git a/files/zh-cn/web/api/eventsource/open_event/index.html b/files/zh-cn/web/api/eventsource/open_event/index.html new file mode 100644 index 0000000000..64214dbd2f --- /dev/null +++ b/files/zh-cn/web/api/eventsource/open_event/index.html @@ -0,0 +1,57 @@ +--- +title: EventSource.onopen +slug: Web/API/EventSource/open_event +tags: + - API + - Event Handler + - EventSource +translation_of: Web/API/EventSource/onopen +original_slug: Web/API/EventSource/onopen +--- +
{{APIRef('WebSockets API')}}
+ +

{{domxref("EventSource")}}接口的 onopen 属性是一个 {{event("Event_handlers", "event handler")}} ,它在收到{{event("open")}} 事件时被调用,在那时,连接刚被打开。

+ +

语法

+ +
eventSource.onopen = function
+ +

示例

+ +
evtSource.onopen = function() {
+  console.log("Connection to server opened.");
+};
+ +
+

注意 :你可以在 GitHub 上看到一个完整的示例— 请看 使用php的SSE(服务器发送事件)demo。

+
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', "comms.html#handler-eventsource-onopen", "onopen")}}{{Spec2('HTML WHATWG')}}Initial definition
+ + + +

浏览器兼容性

+ +{{Compat("api.EventSource.onopen")}} + +

相关链接

+ + diff --git a/files/zh-cn/web/html/index/index.html b/files/zh-cn/web/html/index/index.html deleted file mode 100644 index baae41e64c..0000000000 --- a/files/zh-cn/web/html/index/index.html +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: HTML 文档索引 -slug: Web/HTML/Index -tags: - - HTML - - 索引 -translation_of: Web/HTML/Index ---- -

{{Index("/zh-CN/docs/Web/HTML")}} 所有可用的 HTML 文档的综合索引列表。

-- cgit v1.2.3-54-g00ecf