Event target for listening to node changes. You can subscribe to "view"
events, which are triggered every time the node's view changes.
node.events.on('view', () => {
// do something...
});
Returns a proxy object for this node. Allows to access the value of the
node by accessing the .val
property.
Optional
path: ApiPathReturns the API object of the extension if the node is an extension node.
When the ext
parameter is provided, it checks if the node is an instance
of the given extension and returns the object's TypeScript type. Otherwise,
it returns the API object of the extension, but without any type checking.
API of the extension
Returns the API object of the extension if the node is an extension node.
When the ext
parameter is provided, it checks if the node is an instance
of the given extension and returns the object's TypeScript type. Otherwise,
it returns the API object of the extension, but without any type checking.
API of the extension
Optional
path: ApiPathOptional
path: ApiPathFind a child node at the given path starting from this node.
Optional
path: ApiPathPath to the child node to find.
JSON CRDT node at the given path.
Optional
path: ApiPathOptional
path: ApiPathSets the value of the node.
JSON/CBOR value or ID (logical timestamp) of the value to set.
Reference to itself.
Optional
path: ApiPathOptional
path: ApiPathOptional
path: ApiPath
Local changes API for the
val
JSON CRDT node ValNode.