# Javascript: DocumentEditorSettings.webSocketProtocols Property

> Optional. An array of additional WebSocket sub-protocols to be passed to the WebSocket constructor. Can be used in order to pass authentication tokens, for example.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 32.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: DocumentEditorSettings.webSocketProtocols Property
- **217 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documenteditorsettings/websocketprotocols-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documenteditorsettings/websocketprotocols-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documenteditorsettings/websocketprotocols-property/llms-full.txt

---

### Description

Optional. An array of additional WebSocket sub-protocols to be passed to the WebSocket constructor. Can be used in order to pass authentication tokens, for example.

### Syntax

```javascript
<string[]> DocumentEditorSettings.webSocketProtocols
```

### Examples

The following example demonstrates `DocumentEditorSettings.webSocketProtocols` in a practical document-editing workflow. Optional. An array of additional WebSocket sub-protocols to be passed to the WebSocket constructor. Can be used in order to pass authentication tokens, for example.

```javascript
function inspectWebSocketProtocols(documentEditorSettings) {
    const webSocketProtocols = documentEditorSettings.webSocketProtocols;
    console.log("web socket protocols:", webSocketProtocols);
}
```

---

## Nearby

- **Previous:** [Javascript: DocumentEditorSettings.userNames Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documenteditorsettings/usernames-property/llms-full.txt)
- **Next:** [DocumentLink Object](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentlink/llms-full.txt)
