---
title: WebSocket.extensions
slug: Web/API/WebSocket/extensions
tags:
  - API
  - Property
  - Reference
  - Web API
  - WebSocket
browser-compat: api.WebSocket.extensions
---
{{APIRef("Web Sockets API")}}

The **`WebSocket.extensions`** read-only property returns the
extensions selected by the server. This is currently only the empty string or a list of
extensions as negotiated by the connection.

## Syntax

```js
var extensions = aWebSocket.extensions;
```

## Value

A {{domxref("DOMString")}}.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
