WebSocketStream: url property
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Note: This feature is available in Web Workers.
The url
read-only property of the
WebSocketStream
interface returns the URL of the WebSocket server that the WebSocketStream
instance was created with.
Value
A string.
Examples
js
const wss = new WebSocketStream("wss://example.com/wss");
// Logs "example.com/wss" to the console
console.log(wss.url);
Specifications
Not currently a part of any specification. See https://github.com/whatwg/websockets/pull/48 for standardization progress.
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
See also
- WebSocketStream: integrating streams with the WebSocket API, developer.chrome.com (2020)