history is exposed to the user to manage undo/redo operations.
addOnlineClient adds the given clientID into the online client set.
applyChangePack applies the given change pack into this document.
applyDocEventsForReplay applies the given events into this document.
applySnapshot applies the given snapshot into this document.
Optionalsnapshot: Uint8Array<ArrayBufferLike>applyWatchStream applies the given watch stream response into this document.
createChangePack create change pack of the local changes to send to the
remote server.
ensureClone make a clone of root.
garbageCollect purges elements that were removed before the given time.
getChangeID returns the change id of this document.
getCheckpoint returns the checkpoint of this document.
getClone returns this clone.
getCloneRoot returns clone object.
getDocSize returns the size of this document.
getGarbageLen returns the length of elements should be purged.
getGarbageLenFromClone returns the length of elements should be purged from clone.
getKey returns the key of this document.
getMaxSizePerDocument gets the maximum size of this document.
getMyPresence returns the presence of the current client.
getOthersForTest returns all the other clients in online, sorted by clientID.
getOthersPresences returns the presences of all other clients.
getPresence returns the presence of the given clientID.
getPresenceForTest returns the presence of the given clientID
regardless of whether the client is online or not.
getPresences returns the presences of online clients.
getRedoStackForTest returns the redo stack for test.
getRoot returns a new proxy of cloned root.
getRootCRDT returns the CRDTRoot for testing purposes.
This method is intended for internal testing only.
getRootObject returns root object.
getSchemaRules gets the schema rules of this document.
getSelfForTest returns the client that has attached this document.
getStats returns the statistics of this document.
getStatus returns the status of this document.
getUndoStackForTest returns the undo stack for test.
getValueByPath returns the JSONElement corresponding to the given path.
getVersionVector returns the version vector of document
hasLocalChanges returns whether this document has local changes or not.
hasPresence returns whether the given clientID has a presence or not.
isEnableDevtools returns whether devtools is enabled or not.
removeOnlineClient removes the clientID from the online client set.
resetOnlineClients resets the online client set.
setActor sets actor into this document. This is also applied in the local
changes the document has.
setMaxSizePerDocument sets the maximum size of this document.
setOnlineClients sets the given online client set.
setSchemaRules sets the schema rules of this document.
subscribe registers a callback to subscribe to events on the document.
The callback will be called when the document is changed.
Optionalerror: ErrorFnOptionalcomplete: CompleteFnsubscribe registers a callback to subscribe to events on the document.
The callback will be called when the clients watching the document
establishe or update its presence.
Optionalerror: ErrorFnOptionalcomplete: CompleteFnsubscribe registers a callback to subscribe to events on the document.
The callback will be called when the current client establishes or updates its presence.
Optionalerror: ErrorFnOptionalcomplete: CompleteFnsubscribe registers a callback to subscribe to events on the document.
The callback will be called when the client establishes or terminates a connection,
or updates its presence.
Optionalerror: ErrorFnOptionalcomplete: CompleteFnsubscribe registers a callback to subscribe to events on the document.
The callback will be called when the stream connection status changes.
Optionalerror: ErrorFnOptionalcomplete: CompleteFnsubscribe registers a callback to subscribe to events on the document.
The callback will be called when the document status changes.
Optionalerror: ErrorFnOptionalcomplete: CompleteFnsubscribe registers a callback to subscribe to events on the document.
The callback will be called when the document is synced with the server.
Optionalerror: ErrorFnOptionalcomplete: CompleteFnsubscribe registers a callback to subscribe to events on the document.
The callback will be called when the targetPath or any of its nested values change.
Optionalerror: ErrorFnOptionalcomplete: CompleteFnsubscribe registers a callback to subscribe to events on the document.
The callback will be called when the authentification error occurs.
subscribe registers a callback to subscribe to events on the document.
Optionalerror: ErrorFnOptionalcomplete: CompleteFntoJSForTest returns value with meta data for testing.
toJSON returns the JSON encoding of this document.
toSortedJSON returns the sorted JSON encoding of this document.
update executes the given updater to update this document.
Optionalmessage: string
Documentis a CRDT-based data type. We can represent the model of the application and edit it even while offline. It implements Attachable interface to be managed by Attachment.