Skip to content

Commit

Permalink
Server can't send a bad reason, and wording improvement (by @domenic)
Browse files Browse the repository at this point in the history
Co-authored-by: Domenic Denicola <[email protected]>
  • Loading branch information
ricea and domenic authored Jan 31, 2024
1 parent 47ab0da commit 2b9ee80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1129,9 +1129,9 @@ To <dfn>close using reason</dfn> a {{WebSocketStream}} |stream| given |reason|,
discard |code| and |reasonString| and [=close the WebSocket=] with |stream|.

Note: A {{WebSocketError}} object constructed from JavaScript will always have a
{{WebSocketError/closeCode}} and {{WebSocketError/reason}} that JavaScript is permitted to set,
however the {{WebSocketStream/closed}} promise might be rejected with {{WebSocketError/closeCode}}
values coming from the server that JavaScript is not permitted to set itself, such as 1001 "Going
{{WebSocketError/closeCode}} and {{WebSocketError/reason}} that JavaScript is permitted to set.
However, the {{WebSocketStream/closed}} promise might be rejected with a {{WebSocketError}} whose {{WebSocketError/closeCode}} has a
value coming from the server that JavaScript is not permitted to set itself, such as 1001 "Going
Away".
</div>

Expand Down

0 comments on commit 2b9ee80

Please sign in to comment.