This replica's replicaID
, usually
obtained from ReplicaIDs. Must not be ""
.
A unique ID for this replica (copy of a Collabs document).
Internal (Collab.send) use only.
Sends the given message on behalf of child. In general, this parent is then responsible for delivering the given message to Collab.receive on each replica of child, with guarantees set by the runtime.
Emits an event, which triggers all the registered event handlers.
Event handlers are called in the order they are added. Errors in
event handlers are captured and logged (with console.error
),
not propagated to the caller.
Name of the event to emit.
Event object to pass to the event handlers.
Inverse of idOf.
Returns a CollabID for the given Collab.
The CollabID may be passed to fromID on any replica of this
runtime to obtain that replica's copy of collab
.
Registers an event handler that is triggered when the event happens.
Name of the event to listen on.
Callback that handles the event.
If true, the event handler is triggered at most once (the next time the event happens), then unsubscribed.
An "off" function that removes the event handler when called.
Registers an event handler that is triggered when the event happens.
An "off" function that removes the event handler when called.
Generated using TypeDoc
Skeletal implementation of IRuntime that uses a root Collab.