Makes changes observable for this collection.
Adding any kind of change listener to an object will call this method.
Various collections implement this method to activate internal change listeners
needed to propagate their own changes.
Particularly, the module collections/listen/array-changes
installs this method
on the Array
prototype.
Calling this method on an array will either swap its prototype with the
observable array prototype or patch observable methods on the instance.
These methods in turn translate all array changes into range changes (as all
changes can be modeled by a splice operation), map changes (as the array is a
map from index to value), and property changes (as every index is a property,
but also taking the length
into account).
Adds a listener for when values are added or removed at any position.
Adds a listener for when the value for a key changes, or when entries are added or removed.
Adds a listener for an owned property with the given name.