Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add {{AvailableInWorkers}} for Websockets API #35985

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/en-us/web/api/closeevent/closeevent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/closeevent/code/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/closeevent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/closeevent/reason/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/closeevent/wasclean/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/binarytype/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/bufferedamount/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/close/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/close_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/error_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/extensions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/message_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/open_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/protocol/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/readystate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/send/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/url/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocket/websocket/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websockets_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocketstream/close/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocketstream/closed/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocketstream/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocketstream/opened/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/websocketstream/url/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down