deno.com
property WebSocket.extensions

Returns the extensions selected by the server, if any.

WebSocket extensions add optional features negotiated during the handshake via the Sec-WebSocket-Extensions header.

At the time of writing, there are two registered extensions:

See the full list at IANA WebSocket Extensions.

Example:

const ws = new WebSocket("ws://localhost:8080");
console.log(ws.extensions); // e.g., "permessage-deflate"

Type #

string