A mapping of the events this model reference could emit to each event's unique name. Use this to refer an event name:
localReference.on(LocalModelReference.Events.SET, function listener(e) {
// ...
})
Adds a new event listener for the specified event. The class will ignore duplicate registrations of the same listener to the same event.
The name of the event to add the listener for.
The listener callback to register.
This object, in support of a fluent API.
Clears any values on this reference. This is a way to explictly indicate that the reference currently has no value.
Disposes the reference, unpublishing it beforehand if necessary.
Provides the events emitted by this object as an Observable stream.
An Observable stream of all events emitted by this object.
Returns true if this reference has already been disposed (cleaned up).
Returns true.
Returns true if a value is currenly set on the reference.
Returns true if this reference is currently being shared.
Returns the unique key corresponding to this reference.
Removes a single event listener for a specific event.
The name of the event to remove the listener for.
The listener callback to unregister.
This object, in support of a fluent API.
Adds a new event listener for the specified event. The class will ignore duplicate registrations of the same listener to the same event.
The name of the event to add the listener for.
The listener callback to register.
This object, in support of a fluent API.
Adds a single shot event listener for the specified event. The listener will be called the first time the specified event is fired after the event registration occurs, after which the registration will be removed and no further events will be passed to the listener.
The name of the event to add the listener for.
The listener callback to register.
This object, in support of a fluent API.
Returns the underlying ModelReference.
Removes all listeners for all events. This is useful for cleanup before disposing of this particular event emitter.
This object, in support of a fluent API.
Removes a single event listener for a specific event.
The name of the event to remove the listener for.
The listener callback to unregister.
This object, in support of a fluent API.
Removes all listeners bound on the given event.
the name of the event to remove listeners for
This object, in support of a fluent API.
Returns the session ID of the user session that created this reference.
Sets one or multiple values on this reference. If the reference is published, it will emit an event do any remote listeners.
the new value(s)
Publishes the reference, such that other users with access to the attached model can access this reference and its underlying value(s). If the reference is already shared, the call will simply be ignored.
Returns the element or model on which this reference was created.
Returns a string indicating the type of reference this is.
Unpublishes the reference, essentially making it private. If the reference is not currently shared, the call will simply be ignored.
Returns the user that created this reference.
Returns the first value of the underlying reference.
Returns all values of the underlying reference.
A RangeReference that was created locally. See RealTimeString.rangeReference