From c07c6fd60250e9b8dd67ec1c9272d2b167bd2900 Mon Sep 17 00:00:00 2001 From: Adam Rice Date: Wed, 24 Jan 2024 04:10:17 +0900 Subject: [PATCH] Note that backpressure is obeyed for writable Temporarily force-link "writable stream writer" until it can be exported from the streams standard. --- index.bs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 5cdc145..4565efb 100644 --- a/index.bs +++ b/index.bs @@ -34,6 +34,8 @@ spec:html; type:dfn; spec:url; type:dfn; text:origin for:/; text:url +spec:streams; type:dfn + text:writable stream writer
@@ -886,7 +888,10 @@ initially unset.
   : {{WebSocketOpenInfo/writable}}
   :: A {{WritableStream}} that can be used to send messages to the server. Each chunk written will
    be converted to one message. Strings will be sent as text messages; {{BufferSource}} chunks will
-   be sent as binary messages.
+   be sent as binary messages. Backpressure due to the network or server being behind will
+   automatically be observed by piping. When using a [=writable stream writer=], waiting for the
+   {{WritableStreamDefaultWriter/ready|writer.ready}} promise will ensure that backpressure is
+   obeyed.
 
    The WebSocket can be closed by calling {{WritableStream/close()}} on
    {{WebSocketOpenInfo/writable}}.