diff options
author | Ryan Johnson <rjohnson@mozilla.com> | 2021-05-28 12:05:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 12:05:52 -0700 |
commit | 220a7d23b0755acc06146c1262aa09ba22d6e3b1 (patch) | |
tree | 50a6ffafe663dc65f1a0f8816862d60e7ce23a33 /files/zh-cn/web/api/worker/onmessage | |
parent | 2958ec7e85c9a1182cd81728e3705948a2c39d71 (diff) | |
download | translated-content-220a7d23b0755acc06146c1262aa09ba22d6e3b1.tar.gz translated-content-220a7d23b0755acc06146c1262aa09ba22d6e3b1.tar.bz2 translated-content-220a7d23b0755acc06146c1262aa09ba22d6e3b1.zip |
Revert "replace some domxref macro calls with event macro calls (#1016)" (#1017)
This reverts commit 2958ec7e85c9a1182cd81728e3705948a2c39d71.
Diffstat (limited to 'files/zh-cn/web/api/worker/onmessage')
-rw-r--r-- | files/zh-cn/web/api/worker/onmessage/index.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/files/zh-cn/web/api/worker/onmessage/index.html b/files/zh-cn/web/api/worker/onmessage/index.html index 138e1dd41f..9fb062c24f 100644 --- a/files/zh-cn/web/api/worker/onmessage/index.html +++ b/files/zh-cn/web/api/worker/onmessage/index.html @@ -5,7 +5,7 @@ translation_of: Web/API/Worker/onmessage --- <p>{{APIRef("Web Workers API")}}</p> -<p>{{domxref("Worker")}} 接口的<strong><code>onmessage</code></strong>属性表示一个{{event("Event_handlers")}}事件处理函数,当{{event("message")}} 事件发生时,该函数被调用。这些事件所属{{domxref("MessageEvent")}}类型,且当Worker子线程返回一条消息时被调用(比如:从{{domxref("DedicatedWorkerGlobalScope.postMessage")}}函数发出的信息)</p> +<p>{{domxref("Worker")}} 接口的<strong><code>onmessage</code></strong>属性表示一个{{domxref("EventHandler")}}事件处理函数,当{{event("message")}} 事件发生时,该函数被调用。这些事件所属{{domxref("MessageEvent")}}类型,且当Worker子线程返回一条消息时被调用(比如:从{{domxref("DedicatedWorkerGlobalScope.postMessage")}}函数发出的信息)</p> <div class="note"> <p><strong>注意</strong>: 消息被装载到 {{event("message")}}事件对象的<code>data</code>属性。(译者:即传递的消息参数将被赋值给<code>onmessage</code>处理函数的事件参数<code>e</code>中的<code>data</code>属性)</p> |