The ArrayLike interface

attribute unsigned long length
The number of items in the container.
void clear()
Removes all the items from the container by calling splice(0).
sequence<item> add (item newItem, optional item... otherItems)

Add newItem and each otherItems as the last item(s) in the group by calling splice(container.length, 0, newItem, otherItem1, ... otherItemN).

Returns a sequence containing the added items: [newItem, otherItem1, ... otherItemN].

sequence<item> remove ( long index, optional unsigned long count)

Removes the item(s) at index by calling splice(index, count). If count is not supplied, the default value is 1.

Returns a sequence containing the removed items.

sequence<item> splice ()

Modifies the list of children of this container by first removing deleteCount items from start followed by adding newItems at the same point.

The operation of slice is based on ECMAScript 5's Array.prototype.splice.

Returns a sequence of the items removed from group during the removal step (regardless of whether these items were re-added during the addition step).

optional long start
The index at which items should be removed and inserted. Negative indices represent an offset from the end of the list of items. This value is clamped to the range [-length, length].
optional unsigned long deleteCount
The number of items to remove from the container beginning at start. Negative values are clamped to zero, and all other values are clamped such that 0 < start + deleteCountlength.
optional sequence<item> newItems
The items to be added at start. Each item, if it already has a parent group (including this group), is first removed from its parent group before being added to this group.
sequence<item> splice (optional long start, optional unsigned long deleteCount, optional item... newItem)
An overload of splice to take a variadic list of items rather than requiring a sequence. The operation is identical to splice(unsigned long start, unsigned long deleteCount, sequence<item> newItems).
long indexOf (item item)
Returns the index of item within the container. If item appears more than once, returns first index. If item is not in the group, returns -1.