From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/websocket/url/index.html | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 files/zh-cn/web/api/websocket/url/index.html (limited to 'files/zh-cn/web/api/websocket/url') diff --git a/files/zh-cn/web/api/websocket/url/index.html b/files/zh-cn/web/api/websocket/url/index.html new file mode 100644 index 0000000000..e28d09a725 --- /dev/null +++ b/files/zh-cn/web/api/websocket/url/index.html @@ -0,0 +1,51 @@ +--- +title: WebSocket.url +slug: Web/API/WebSocket/url +tags: + - API + - Property + - Refrence + - Web API + - WebSocket +translation_of: Web/API/WebSocket/url +--- +

{{APIRef("Web Sockets API")}}

+ +

The WebSocket.url read-only property returns the absolute URL of the {{domxref("WebSocket")}} as resolved by the constructor.

+ +

WebSocket.url是一个只读属性,返回值为当构造函数创建{{domxref("WebSocket")}}实例对象时URL的绝对路径。

+ +

语法

+ +
var url = aWebSocket.url;
+ +

 

+ +

返回值

+ +

A DOMString.

+ +

规范

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-websocket-url', 'WebSocket: url')}}{{Spec2('HTML WHATWG')}}Initial definition
+ +

浏览器兼容性

+ + + +

{{Compat("api.WebSocket.url")}}

-- cgit v1.2.3-54-g00ecf