From 05a7219ba9605649cb6daa281e26209eaa73adf0 Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Fri, 28 May 2021 12:36:36 -0700 Subject: fix MacroWrongXRefError flaws for some domxref calls (#1018) --- files/zh-cn/web/api/eventsource/index.html | 12 ++++++------ files/zh-cn/web/api/eventsource/onerror/index.html | 2 +- files/zh-cn/web/api/eventsource/onopen/index.html | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'files/zh-cn/web/api/eventsource') diff --git a/files/zh-cn/web/api/eventsource/index.html b/files/zh-cn/web/api/eventsource/index.html index 55a81c56ef..742c13bf3a 100644 --- a/files/zh-cn/web/api/eventsource/index.html +++ b/files/zh-cn/web/api/eventsource/index.html @@ -29,11 +29,11 @@ original_slug: Server-sent_events/EventSource
{{domxref("EventSource.onerror")}}
-
是一个 {{domxref("EventHandler")}},当发生错误时被调用,并且在此对象上派发 {{event("error")}} 事件。
+
是一个 {{event("Event_handlers", "event handler")}},当发生错误时被调用,并且在此对象上派发 {{event("error")}} 事件。
{{domxref("EventSource.onmessage")}}
-
是一个 {{domxref("EventHandler")}},当收到一个 {{event("message")}} 事件,即消息来自源头时被调用。
+
是一个 {{event("Event_handlers", "event handler")}},当收到一个 {{event("message")}} 事件,即消息来自源头时被调用。
{{domxref("EventSource.onopen")}}
-
是一个 {{domxref("EventHandler")}},当收到一个 {{event(" open ")}} 事件,即连接刚打开时被调用。
+
是一个 {{event("Event_handlers", "event handler")}},当收到一个 {{event(" open ")}} 事件,即连接刚打开时被调用。
{{domxref("EventSource.readyState")}} {{readonlyinline}}
一个 unsigned short 值,代表连接状态。可能值是 CONNECTING (0), OPEN (1), 或者 CLOSED (2)。
{{domxref("EventSource.url")}} {{readonlyinline}}
@@ -44,11 +44,11 @@ original_slug: Server-sent_events/EventSource
{{domxref("EventSource.onerror")}}
-
Is an {{domxref("EventHandler")}} called when an error occurs and the {{domxref("EventSource/error_event", "error")}} event is dispatched on an EventSource object.
+
Is an {{event("Event_handlers", "event handler")}} called when an error occurs and the {{domxref("EventSource/error_event", "error")}} event is dispatched on an EventSource object.
{{domxref("EventSource.onmessage")}}
-
Is an {{domxref("EventHandler")}} called when a {{domxref("EventSource/message_event", "message")}} event is received, that is when a message is coming from the source.
+
Is an {{event("Event_handlers", "event handler")}} called when a {{domxref("EventSource/message_event", "message")}} event is received, that is when a message is coming from the source.
{{domxref("EventSource.onopen")}}
-
Is an {{domxref("EventHandler")}} called when an {{domxref("EventSource/open_event", "open")}} event is received, that is when the connection was just opened.
+
Is an {{event("Event_handlers", "event handler")}} called when an {{domxref("EventSource/open_event", "open")}} event is received, that is when the connection was just opened.

方法

diff --git a/files/zh-cn/web/api/eventsource/onerror/index.html b/files/zh-cn/web/api/eventsource/onerror/index.html index dbc9dc3e2c..c7ab46f363 100644 --- a/files/zh-cn/web/api/eventsource/onerror/index.html +++ b/files/zh-cn/web/api/eventsource/onerror/index.html @@ -9,7 +9,7 @@ original_slug: Server-sent_events/EventSource/onerror
 
-

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

+

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

语法

diff --git a/files/zh-cn/web/api/eventsource/onopen/index.html b/files/zh-cn/web/api/eventsource/onopen/index.html index 9a4668264a..d7b087d023 100644 --- a/files/zh-cn/web/api/eventsource/onopen/index.html +++ b/files/zh-cn/web/api/eventsource/onopen/index.html @@ -10,7 +10,7 @@ original_slug: Server-sent_events/EventSource/onopen ---
{{APIRef('WebSockets API')}}
-

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

+

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

语法

-- cgit v1.2.3-54-g00ecf