File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ import { WebsocketProvider } from 'y-websocket'
82
82
wsOpts = {
83
83
// Set this to `false` if you want to connect manually using wsProvider.connect()
84
84
connect: true ,
85
- // Specify a query-string that will be url-encoded and attached to the `serverUrl`
85
+ // Specify a query-string / url parameters that will be url-encoded and attached to the `serverUrl`
86
86
// I.e. params = { auth: "bearer" } will be transformed to "?auth=bearer"
87
87
params: {}, // Object<string,string>
88
88
// You may polyill the Websocket object (https://developer.mozilla.org/en-US/docs/Web/API/WebSocket).
@@ -106,6 +106,10 @@ wsOpts = {
106
106
<dd >True if this instance is currently communicating to other browser-windows via BroadcastChannel.</dd >
107
107
<b ><code >wsProvider.synced: boolean</code ></b >
108
108
<dd >True if this instance is currently connected and synced with the server.</dd >
109
+ <b ><code >wsProvider.params : boolean</code ></b >
110
+ <dd >The specified url parameters. This can be safely updated, the new values
111
+ will be used when a new connction is established. If this contains an
112
+ auth token, it should be updated regularly.</dd>
109
113
<b ><code >wsProvider.disconnect()</code ></b >
110
114
<dd >Disconnect from the server and don't try to reconnect.</dd >
111
115
<b ><code >wsProvider.connect()</code ></b >
You can’t perform that action at this time.
0 commit comments