diff options
author | MDN <actions@users.noreply.github.com> | 2021-12-16 00:52:08 +0000 |
---|---|---|
committer | MDN <actions@users.noreply.github.com> | 2021-12-16 00:52:08 +0000 |
commit | 9b97f9f4a1f580cbf582fb4bebabbccaab8e5dda (patch) | |
tree | 513e8e35a07a3fd1dc45a5415425fd3780075d51 /files/zh-cn/web/api/websocket/onmessage | |
parent | 7f7c1b96a524c16de813516cc1b7ed3b773ae7ad (diff) | |
download | translated-content-9b97f9f4a1f580cbf582fb4bebabbccaab8e5dda.tar.gz translated-content-9b97f9f4a1f580cbf582fb4bebabbccaab8e5dda.tar.bz2 translated-content-9b97f9f4a1f580cbf582fb4bebabbccaab8e5dda.zip |
[CRON] sync translated content
Diffstat (limited to 'files/zh-cn/web/api/websocket/onmessage')
-rw-r--r-- | files/zh-cn/web/api/websocket/onmessage/index.html | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/files/zh-cn/web/api/websocket/onmessage/index.html b/files/zh-cn/web/api/websocket/onmessage/index.html deleted file mode 100644 index 4bdcb51039..0000000000 --- a/files/zh-cn/web/api/websocket/onmessage/index.html +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: WebSocket.onmessage -slug: Web/API/WebSocket/onmessage -tags: - - API - - Web API - - WebSocket - - 参考 - - 属性 -translation_of: Web/API/WebSocket/onmessage ---- -<p>{{APIRef("Web Sockets API")}}</p> - -<p><code><strong>WebSocket.onmessage</strong></code> 属性是一个当收到来自服务器的消息时被调用的 {{event("Event_handlers", "event handler")}}。它由一个{{domxref("MessageEvent")}}调用。</p> - -<h2 id="语法">语法</h2> - -<pre class="syntaxbox"><em>aWebSocket</em>.onmessage = function(event) { - console.debug("WebSocket message received:", event); -};</pre> - -<h2 id="值">值</h2> - -<p>一个 {{domxref("EventListener")}}.</p> - -<h2 id="规范">规范</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">规范</th> - <th scope="col">状态</th> - <th scope="col">注释</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName('HTML WHATWG', '#handler-websocket-onmessage', 'WebSocket: onmessage')}}</td> - <td>{{Spec2('HTML WHATWG')}}</td> - <td>初始定义</td> - </tr> - </tbody> -</table> - -<h2 id="浏览器兼容性">浏览器兼容性</h2> - - - -<p>{{Compat("api.WebSocket.onmessage")}}</p> |