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/onopen | |
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/onopen')
-rw-r--r-- | files/zh-cn/web/api/websocket/onopen/index.html | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/files/zh-cn/web/api/websocket/onopen/index.html b/files/zh-cn/web/api/websocket/onopen/index.html deleted file mode 100644 index 067c9057bc..0000000000 --- a/files/zh-cn/web/api/websocket/onopen/index.html +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: WebSocket.onopen -slug: Web/API/WebSocket/onopen -translation_of: Web/API/WebSocket/onopen ---- -<p><strong><code>WebSocket.onopen</code></strong>属性定义一个事件处理程序,当{{domxref("WebSocket")}} 的连接状态{{domxref("WebSocket.readyState","readyState")}} 变为{{domxref("WebSocket.readyState","1")}}时调用;这意味着当前连接已经准备好发送和接受数据。这个事件处理程序通过 {{domxref("事件")}}(建立连接时)触发。</p> - -<h2 id="语法">语法</h2> - -<pre class="syntaxbox notranslate"><em>aWebSocket</em>.onopen = function(event) { - console.log("WebSocket is open now."); -};</pre> - -<h2 id="返回值">返回值</h2> - -<p>An {{domxref("EventListener")}}.</p> - -<h2 id="规范">规范</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName('HTML WHATWG', '#handler-websocket-onopen', 'WebSocket: onopen')}}</td> - <td>{{Spec2('HTML WHATWG')}}</td> - <td>Initial definition</td> - </tr> - </tbody> -</table> - -<h2 id="浏览器兼容性">浏览器兼容性</h2> - - - -<p>{{Compat("api.WebSocket.onopen")}}</p> |