@@ -876,11 +876,10 @@ initially unset.
876
876
as ArrayBuffer objects.
877
877
878
878
The stream can be closed by calling {{ReadableStream/cancel()}} on
879
- {{WebSocketOpenInfo/readable}} . If the argument passed to {{ReadableStream/cancel()}} is an
880
- object with a {{WebSocketCloseInfo/code}} property and an <span class=allow-2119> optional</span> {{WebSocketCloseInfo/reason}}
881
- property then {{WebSocketCloseInfo/code}} will be used as [=the WebSocket connection close
882
- code=] and {{WebSocketCloseInfo/reason}} or the empty string will be used as [=the WebSocket
883
- connection close reason=] .
879
+ {{WebSocketOpenInfo/readable}} . If the reason argument passed to {{ReadableStream/cancel()}} is a
880
+ {{WebSocketError}} object then {{WebSocketError/closeCode}} will be used as [=the WebSocket
881
+ connection close code=] and {{WebSocketError/reason}} will be used as [=the WebSocket connection
882
+ close reason=] .
884
883
885
884
If no messages are read, or if messages are read slower than they are sent, then backpressure
886
885
will be applied and eventually the server will stop sending new messages.
@@ -897,9 +896,9 @@ initially unset.
897
896
{{WebSocketOpenInfo/writable}} .
898
897
899
898
The stream can also be closed by calling {{WritableStream/abort()}}
900
- {{WebSocketOpenInfo/writable}} . If an argument is passed to {{WritableStream/abort()}} then it
901
- can be used to specify [=the WebSocket connection close code=] and [=the WebSocket connection
902
- close reason=] as with {{ReadableStream/cancel()}} above.
899
+ {{WebSocketOpenInfo/writable}} . If the reason passed to {{WritableStream/abort()}} is a
900
+ {{WebSocketError]}} , then it will be used to set [=the WebSocket connection close code=] and
901
+ [=the WebSocket connection close reason=] as with {{ReadableStream/cancel()}} above.
903
902
904
903
: {{WebSocketOpenInfo/extensions}}
905
904
:: The [=extensions in use=] for the connection.
0 commit comments