PSA: WebSocketStream API change

122 views
Skip to first unread message

Adam Rice

unread,
Aug 1, 2023, 3:59:03 AM8/1/23
to blink-dev
WebSocketStream is not a shipped API so normally we wouldn't announce changes, but I know some people are trying it out using the experimental flag, so I am sending this PSA.

From Chromium version 117.0.5914.0 onwards, the "connection" attribute has been renamed to "opened".

Where previously you would have written
const { readable, writable, protocol, extensions } = await wss.connection;

now you should write:
const { readable, writable, protocol, extensions } = await wss.opened;

The explainer has already been updated to the new API.

This change was made for alignment with the Direct Sockets API.

Shipping WebSocketStream is currently stalled on the standardisation process. We don't yet have a concrete timeline for when it will be shipped.

Thomas Steiner

unread,
Aug 1, 2023, 4:57:24 AM8/1/23
to Adam Rice, blink-dev
Opened https://github.com/GoogleChrome/developer.chrome.com/pull/6965 to also reflect this change in the developer-facing docs.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAC_ixdzhuZz9c%3DsPB5H%3DZXE%2BU%2B%3Drfd9wPXU3Fc4PiyhXMWc3yw%40mail.gmail.com.


--
Thomas Steiner, PhD—Developer Relations Engineer (https://blog.tomayac.comhttps://twitter.com/tomayac)

Google Germany GmbH, ABC-Str. 19, 20354 Hamburg, Germany
Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891

----- BEGIN PGP SIGNATURE -----
Version: GnuPG v2.3.4 (GNU/Linux)

iFy0uwAntT0bE3xtRa5AfeCheCkthAtTh3reSabiGbl0ck0fjumBl3DCharaCTersAttH3b0ttom.hTtPs://xKcd.cOm/1181/
----- END PGP SIGNATURE -----
Reply all
Reply to author
Forward
0 new messages