API Docs for: 1.0.0
Show:

gallery-multiobject Module

MultiObject exposes exactly the same API as each individual object, both functions and events, and the state of all the objects is kept in sync. The objects must maintain all state via Y.Attribute.

MultiObject is similar to Y.ArrayList, except:

  • All objects must be of the same type, since MultiObject is supposed to behave exactly like any single object.
  • MultiObject automatically delegates all methods.
  • By default, MultiObject returns the result from the first object in the list, not an array of results.
  • MultiObject propagates all events.

Internally, MultiObject delegates all methods by name, so it supports Y.Do.before, Y.Do.after, etc.

To avoid shadowing potential function names, we inherit from Y.EventTarget and use multi_ as the prefix for our own functions.

This module provides the following classes: