An expanded version of standard JS Array, adding convenience methods for
manipulation. Add and remove changes to the Collection trigger a Collection
event. Note that this does not cover changes to the objects within the
Collection; they trigger events on the appropriate object, not on the
Collection as a whole.
Increases the revision counter and dispatches a 'change' event.
Returns void
Api
clear
clear(): void
Remove all elements from the collection.
Returns void
Api
dispatchEvent
dispatchEvent(event): undefined | boolean
Dispatches an event and calls all listeners listening for events
of this type. The event parameter can either be a string or an
Object with a type property.
Parameters
event: string | BaseEvent
Event object.
Returns undefined | boolean
false if anyone called preventDefault on the
event object or if any of the listeners returned false.
Get a reference to the underlying Array object. Warning: if the array
is mutated, no events will be dispatched by the collection, and the
collection's "length" property won't be in sync with the actual length
of the array.
Classdesc
An expanded version of standard JS Array, adding convenience methods for manipulation. Add and remove changes to the Collection trigger a Collection event. Note that this does not cover changes to the objects within the Collection; they trigger events on the appropriate object, not on the Collection as a whole.
Fires
CollectionEvent
Api