A class to provide Yjs synchronization over WebSocket.
The user can specify their own user-name and user-color by adding url parameters: ?username=Alice&usercolor=007007 where usercolor must be a six-digit hexadecimal encoded RGB value without the hash token.
We specify custom messages that the server can interpret. For reference please look in yjs_ws_server.
Handle a change to the connection status.
Send a new message to WebSocket server.
Listens to Yjs updates and sends them to remote peers (ws and broadcastchannel)
Whether to connect to other peers or not
Acquire a lock. Returns a Promise that resolves to the lock number.
Destroy the provider.
Emit a named event. All registered event listeners that listen to the specified name will receive the event.
The event name.
The arguments that are applied to the event listener.
Put the initialized state.
Release a lock.
The lock to release.
Resolves to true if the initial content has been initialized on the server. false otherwise.
This should be called by the docregistry when the file has been renamed to update the websocket connection url
Generated using TypeDoc