diff --git a/files/en-us/web/api/closeevent/closeevent/index.md b/files/en-us/web/api/closeevent/closeevent/index.md index 6aecfca5a62cbea..bc785f293eb0a4e 100644 --- a/files/en-us/web/api/closeevent/closeevent/index.md +++ b/files/en-us/web/api/closeevent/closeevent/index.md @@ -6,7 +6,7 @@ page-type: web-api-constructor browser-compat: api.CloseEvent.CloseEvent --- -{{APIRef("Websockets API")}} +{{APIRef("Websockets API")}}{{AvailableInWorkers}} The **`CloseEvent()`** constructor creates a new {{domxref("CloseEvent")}} object. diff --git a/files/en-us/web/api/closeevent/code/index.md b/files/en-us/web/api/closeevent/code/index.md index dd80a8d6f92fcc5..eaff819b0a74b6c 100644 --- a/files/en-us/web/api/closeevent/code/index.md +++ b/files/en-us/web/api/closeevent/code/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.CloseEvent.code --- -{{APIRef("Websockets API")}} +{{APIRef("Websockets API")}}{{AvailableInWorkers}} The **`code`** read-only property of the {{domxref("CloseEvent")}} interface returns a [WebSocket connection close code](https://www.rfc-editor.org/rfc/rfc6455.html#section-7.1.5) indicating the reason the connection was closed. diff --git a/files/en-us/web/api/closeevent/index.md b/files/en-us/web/api/closeevent/index.md index 2800eb565cadec7..9d43b29e9273bf8 100644 --- a/files/en-us/web/api/closeevent/index.md +++ b/files/en-us/web/api/closeevent/index.md @@ -5,7 +5,7 @@ page-type: web-api-interface browser-compat: api.CloseEvent --- -{{APIRef("Websockets API")}} +{{APIRef("Websockets API")}}{{AvailableInWorkers}} A `CloseEvent` is sent to clients using {{Glossary("WebSockets")}} when the connection is closed. This is delivered to the listener indicated by the `WebSocket` object's `onclose` attribute. diff --git a/files/en-us/web/api/closeevent/reason/index.md b/files/en-us/web/api/closeevent/reason/index.md index 691de22a424e34c..1898915b82db4ad 100644 --- a/files/en-us/web/api/closeevent/reason/index.md +++ b/files/en-us/web/api/closeevent/reason/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.CloseEvent.reason --- -{{APIRef("Websockets API")}} +{{APIRef("Websockets API")}}{{AvailableInWorkers}} The **`reason`** read-only property of the {{domxref("CloseEvent")}} interface returns the [WebSocket connection close reason](https://www.rfc-editor.org/rfc/rfc6455.html#section-7.1.6) the server gave for closing the connection; that is, a concise human-readable prose explanation for the closure. diff --git a/files/en-us/web/api/closeevent/wasclean/index.md b/files/en-us/web/api/closeevent/wasclean/index.md index 821825ec1c3ec48..32e64b0a760fe94 100644 --- a/files/en-us/web/api/closeevent/wasclean/index.md +++ b/files/en-us/web/api/closeevent/wasclean/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.CloseEvent.wasClean --- -{{APIRef("Websockets API")}} +{{APIRef("Websockets API")}}{{AvailableInWorkers}} The **`wasClean`** read-only property of the {{domxref("CloseEvent")}} interface returns `true` if the connection closed cleanly. diff --git a/files/en-us/web/api/websocket/binarytype/index.md b/files/en-us/web/api/websocket/binarytype/index.md index 4298e7433305138..ad5f95568a53f1d 100644 --- a/files/en-us/web/api/websocket/binarytype/index.md +++ b/files/en-us/web/api/websocket/binarytype/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.WebSocket.binaryType --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection. diff --git a/files/en-us/web/api/websocket/bufferedamount/index.md b/files/en-us/web/api/websocket/bufferedamount/index.md index 09d1eb7a5eccc4d..42ebfb06fd0a226 100644 --- a/files/en-us/web/api/websocket/bufferedamount/index.md +++ b/files/en-us/web/api/websocket/bufferedamount/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.WebSocket.bufferedAmount --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The **`WebSocket.bufferedAmount`** read-only property returns the number of bytes of data that have been queued using calls to [`send()`](/en-US/docs/Web/API/WebSocket/send) but diff --git a/files/en-us/web/api/websocket/close/index.md b/files/en-us/web/api/websocket/close/index.md index e953c95d174c2ee..beaa9a775405483 100644 --- a/files/en-us/web/api/websocket/close/index.md +++ b/files/en-us/web/api/websocket/close/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-method browser-compat: api.WebSocket.close --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The **`WebSocket.close()`** method closes the {{domxref("WebSocket")}} connection or connection attempt, if any. If the connection is diff --git a/files/en-us/web/api/websocket/close_event/index.md b/files/en-us/web/api/websocket/close_event/index.md index cbcb4a2e7fb22e2..63b49a6a5f7aba7 100644 --- a/files/en-us/web/api/websocket/close_event/index.md +++ b/files/en-us/web/api/websocket/close_event/index.md @@ -6,7 +6,7 @@ page-type: web-api-event browser-compat: api.WebSocket.close_event --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The `close` event is fired when a connection with a `WebSocket` is closed. diff --git a/files/en-us/web/api/websocket/error_event/index.md b/files/en-us/web/api/websocket/error_event/index.md index d6c2fd0279af5ee..032aeb7d1e002bc 100644 --- a/files/en-us/web/api/websocket/error_event/index.md +++ b/files/en-us/web/api/websocket/error_event/index.md @@ -6,7 +6,7 @@ page-type: web-api-event browser-compat: api.WebSocket.error_event --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The `error` event is fired when a connection with a `WebSocket` has been closed due to an error (some data couldn't be sent for example). diff --git a/files/en-us/web/api/websocket/extensions/index.md b/files/en-us/web/api/websocket/extensions/index.md index 371f8151d96f3f2..59458a3c1e7ce82 100644 --- a/files/en-us/web/api/websocket/extensions/index.md +++ b/files/en-us/web/api/websocket/extensions/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.WebSocket.extensions --- -{{APIRef("Web Sockets API")}} +{{APIRef("Web Sockets API")}}{{AvailableInWorkers}} The **`WebSocket.extensions`** read-only property returns the extensions selected by the server. This is currently only the empty string or a list of diff --git a/files/en-us/web/api/websocket/index.md b/files/en-us/web/api/websocket/index.md index 48e06a3f1c1a89e..c93e1d6f9e98e79 100644 --- a/files/en-us/web/api/websocket/index.md +++ b/files/en-us/web/api/websocket/index.md @@ -5,7 +5,7 @@ page-type: web-api-interface browser-compat: api.WebSocket --- -{{APIRef("WebSockets API")}} {{AvailableInWorkers}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The `WebSocket` object provides the API for creating and managing a [WebSocket](/en-US/docs/Web/API/WebSockets_API) connection to a server, as well as for sending and receiving data on the connection. diff --git a/files/en-us/web/api/websocket/message_event/index.md b/files/en-us/web/api/websocket/message_event/index.md index bf2898937252acf..e82192854e4f2b1 100644 --- a/files/en-us/web/api/websocket/message_event/index.md +++ b/files/en-us/web/api/websocket/message_event/index.md @@ -6,7 +6,7 @@ page-type: web-api-event browser-compat: api.WebSocket.message_event --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The `message` event is fired when data is received through a `WebSocket`. diff --git a/files/en-us/web/api/websocket/open_event/index.md b/files/en-us/web/api/websocket/open_event/index.md index 95e123a2ab36f43..4daaf338f284005 100644 --- a/files/en-us/web/api/websocket/open_event/index.md +++ b/files/en-us/web/api/websocket/open_event/index.md @@ -6,7 +6,7 @@ page-type: web-api-event browser-compat: api.WebSocket.open_event --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The `open` event is fired when a connection with a `WebSocket` is opened. diff --git a/files/en-us/web/api/websocket/protocol/index.md b/files/en-us/web/api/websocket/protocol/index.md index 766650be131e57e..9aa15d3efad61e5 100644 --- a/files/en-us/web/api/websocket/protocol/index.md +++ b/files/en-us/web/api/websocket/protocol/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.WebSocket.protocol --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The **`WebSocket.protocol`** read-only property returns the name of the [sub-protocol](/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#subprotocols) the server selected; this will be one of the strings specified in the [`protocols`](/en-US/docs/Web/API/WebSocket/WebSocket#protocols) parameter when creating the {{domxref("WebSocket")}} object, or the empty string if no connection is established. diff --git a/files/en-us/web/api/websocket/readystate/index.md b/files/en-us/web/api/websocket/readystate/index.md index eefdca0547a950d..fbb471c620873fc 100644 --- a/files/en-us/web/api/websocket/readystate/index.md +++ b/files/en-us/web/api/websocket/readystate/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.WebSocket.readyState --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The **`WebSocket.readyState`** read-only property returns the current state of the {{domxref("WebSocket")}} connection. diff --git a/files/en-us/web/api/websocket/send/index.md b/files/en-us/web/api/websocket/send/index.md index 165422552af71bc..9d411f3a5a1f384 100644 --- a/files/en-us/web/api/websocket/send/index.md +++ b/files/en-us/web/api/websocket/send/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-method browser-compat: api.WebSocket.send --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The **`WebSocket.send()`** method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of diff --git a/files/en-us/web/api/websocket/url/index.md b/files/en-us/web/api/websocket/url/index.md index 9ad0df6dcfedc73..1e0af7f4ba35e86 100644 --- a/files/en-us/web/api/websocket/url/index.md +++ b/files/en-us/web/api/websocket/url/index.md @@ -6,7 +6,7 @@ page-type: web-api-instance-property browser-compat: api.WebSocket.url --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The **`WebSocket.url`** read-only property returns the absolute URL of the {{domxref("WebSocket")}} as resolved by the constructor. diff --git a/files/en-us/web/api/websocket/websocket/index.md b/files/en-us/web/api/websocket/websocket/index.md index a34aad77cb92bbb..b066a8ffde0ed79 100644 --- a/files/en-us/web/api/websocket/websocket/index.md +++ b/files/en-us/web/api/websocket/websocket/index.md @@ -6,7 +6,7 @@ page-type: web-api-constructor browser-compat: api.WebSocket.WebSocket --- -{{APIRef("WebSockets API")}} +{{APIRef("WebSockets API")}}{{AvailableInWorkers}} The **`WebSocket()`** constructor returns a new {{domxref("WebSocket")}} object and immediately attempts to establish a connection to the specified WebSocket URL. diff --git a/files/en-us/web/api/websockets_api/index.md b/files/en-us/web/api/websockets_api/index.md index 6fb0bb01bbf95ca..da14e2e2c4e7957 100644 --- a/files/en-us/web/api/websockets_api/index.md +++ b/files/en-us/web/api/websockets_api/index.md @@ -7,7 +7,7 @@ browser-compat: - api.WebSocketStream --- -{{DefaultAPISidebar("WebSockets API")}} +{{DefaultAPISidebar("WebSockets API")}}{{AvailableInWorkers}} The **WebSocket API** makes it possible to open a two-way interactive communication session between the user's browser and a server. With this API, you can send messages to a server and receive responses without having to poll the server for a reply. diff --git a/files/en-us/web/api/websocketstream/close/index.md b/files/en-us/web/api/websocketstream/close/index.md index 57e177a495fa546..e7ecea58628f8be 100644 --- a/files/en-us/web/api/websocketstream/close/index.md +++ b/files/en-us/web/api/websocketstream/close/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.WebSocketStream.close --- -{{APIRef("WebSockets API")}}{{SeeCompatTable}} +{{APIRef("WebSockets API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`close()`** method of the {{domxref("WebSocketStream")}} interface closes the WebSocket connection. The method optionally accepts an object containing a custom code and/or reason indicating why the connection was closed. diff --git a/files/en-us/web/api/websocketstream/closed/index.md b/files/en-us/web/api/websocketstream/closed/index.md index f1198b7fb63a312..1ed8ecc4a8c38aa 100644 --- a/files/en-us/web/api/websocketstream/closed/index.md +++ b/files/en-us/web/api/websocketstream/closed/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.WebSocketStream.closed --- -{{APIRef("WebSockets API")}}{{SeeCompatTable}} +{{APIRef("WebSockets API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`closed`** read-only property of the {{domxref("WebSocketStream")}} interface returns a {{jsxref("Promise")}} that fulfills with an object once the socket connection is closed. The object contains the closing code and reason. diff --git a/files/en-us/web/api/websocketstream/index.md b/files/en-us/web/api/websocketstream/index.md index 88ab63b7a53be82..9f4740885fe825e 100644 --- a/files/en-us/web/api/websocketstream/index.md +++ b/files/en-us/web/api/websocketstream/index.md @@ -7,7 +7,7 @@ status: browser-compat: api.WebSocketStream --- -{{APIRef("WebSockets API")}}{{SeeCompatTable}} +{{APIRef("WebSockets API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`WebSocketStream`** interface of the {{domxref("WebSockets API", "WebSockets API", "", "nocode")}} is a promise-based API for connecting to a WebSocket server. It uses [streams](/en-US/docs/Web/API/Streams_API) to send and receive data on the connection, and can therefore take advantage of stream [backpressure](/en-US/docs/Web/API/Streams_API/Concepts#backpressure) automatically, regulating the speed of reading or writing to avoid bottlenecks in the application. diff --git a/files/en-us/web/api/websocketstream/opened/index.md b/files/en-us/web/api/websocketstream/opened/index.md index b898050e0e4189e..0ec2bf184c9cb86 100644 --- a/files/en-us/web/api/websocketstream/opened/index.md +++ b/files/en-us/web/api/websocketstream/opened/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.WebSocketStream.opened --- -{{APIRef("WebSockets API")}}{{SeeCompatTable}} +{{APIRef("WebSockets API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`opened`** read-only property of the {{domxref("WebSocketStream")}} interface returns a {{jsxref("Promise")}} that fulfills with an object once the socket connection is successfully opened. Among other features, this object contains a {{domxref("ReadableStream")}} and a {{domxref("WritableStream")}} instance for receiving and sending data on the connection. diff --git a/files/en-us/web/api/websocketstream/url/index.md b/files/en-us/web/api/websocketstream/url/index.md index b1f4f0e7b0de96c..0f6a3d1dd7f0405 100644 --- a/files/en-us/web/api/websocketstream/url/index.md +++ b/files/en-us/web/api/websocketstream/url/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.WebSocketStream.url --- -{{APIRef("WebSockets API")}}{{SeeCompatTable}} +{{APIRef("WebSockets API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`url`** read-only property of the {{domxref("WebSocketStream")}} interface returns the URL of the WebSocket server that the `WebSocketStream` instance was created with. diff --git a/files/en-us/web/api/websocketstream/websocketstream/index.md b/files/en-us/web/api/websocketstream/websocketstream/index.md index 2c0948b56a29854..4e86d31c8529131 100644 --- a/files/en-us/web/api/websocketstream/websocketstream/index.md +++ b/files/en-us/web/api/websocketstream/websocketstream/index.md @@ -8,7 +8,7 @@ status: browser-compat: api.WebSocketStream.WebSocketStream --- -{{APIRef("WebSockets API")}}{{SeeCompatTable}} +{{APIRef("WebSockets API")}}{{SeeCompatTable}}{{AvailableInWorkers}} The **`WebSocketStream()`** constructor creates a new {{domxref("WebSocketStream")}} object instance.