blob: 27a66590ccb61bb01ac9e0e41cfd45d69a73e48f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
---
title: WebSocket.extensions
slug: Web/API/WebSocket/extensions
translation_of: Web/API/WebSocket/extensions
---
<p>{{APIRef("Web Sockets API")}}</p>
<p><strong><code>WebSocket.extensions</code></strong>是只读属性,返回服务器已选择的扩展值。目前,链接可以协定的扩展值只有空字符串或者一个扩展列表。</p>
<p>The <strong><code>WebSocket.extensions</code></strong> read-only property returns the extensions selected by the server. This is currently only the empty string or a list of extensions as negotiated by the connection.</p>
<h2 id="语法">语法</h2>
<pre class="syntaxbox"><em>var extensions</em> = aWebSocket.extensions;</pre>
<h2 id="返回值">返回值</h2>
<p>A {{domxref("DOMString")}}.</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', '#dom-websocket-extensions', 'WebSocket: extensions')}}</td>
<td>{{Spec2('HTML WHATWG')}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<p>{{Compat("api.WebSocket.extensions")}}</p>
|