2247N/ABase is designed to be a low level class from which other attribute
2247N/Aand event target based classes in the YUI library can be derived.
2247N/AIt provides a standard template for creating attribute based objects
2247N/Aacross the library and provides a consistent init() and destroy()
2247N/Asequence, by chaining initialization (initializer) and destruction
2247N/A(destructor) methods for the class hierarcy.
2247N/A* Base now destroys plugins before destroying itself
2247N/A destructor prototype functions, which will get invoked after
2247N/A the initializer for the host class into which they are mixed and
5306N/A* toString no longer inadvertently stamps the object, however,
2247N/A we now stamp Base objects in the constructor, to support
2247N/A use cases where the "toString" stamping was implicitly being
2247N/A* As the final step in the destroy phase, Base now does a detachAll() to avoid invoking listeners
5306N/A which may be waiting to be in an async. step which occurs after destruction.
2247N/A* "init" and "destroy" events are now published with the defaultTargetOnly property set to true
3574N/A to define their own event prefix
3817N/A* Made "init" and "destroy" events fireOnce:true (along with
3817N/A "render" in Widget), so that subscriptions made after the
3817N/A events are fired, are notified immediately.
2247N/A* Dynamic and non-dynamically built classes now have their
2247N/A extensions instantiated the same way - during _initHierarchy.
3930N/A also aggregated at the attribute configuration object level,
3142N/A allowing extensions to add to, or overwrite, attribute
3142N/A configuration properties on the host.
3142N/A 1). Creating a completely new class which uses extensions.
3142N/A 2). Mixing in extensions to an existing class.
4742N/A* Documented non-attribute on, after, bubbleTargets and plugins
5024N/A property support in the Base constructor config argument
2247N/A* Fixed hasImpl method on built classes, to look up the class
2247N/A hierarchy for applied extensions.
5161N/A base-base: Provides class hierarchy support for ATTRS and
3431N/A base-build: Provides Extension support in the form of
2247N/A* Config argument for init event now merged into the event facade,
2247N/A instead of being passed separately (available as
e.cfg).
2247N/A* Moved PluginHost down from Widget to Base, since utils and
2247N/A Node will also support Plugins.
3260N/A arguments [plug(pluginClass, cfg) and unplug(pluginClass)].
2738N/A* Split base module up into base-base and base-build.
2738N/A* Added lazy attribute initialization support, to improve performance.
2738N/A This also removes order dependency when processing ATTRS for a
3513N/A If a
get/set call is made for an uninitialized attribute A, in the
3817N/A* Developers can now override the default clone behavior we use to
3930N/A isolate default ATTRS config values, using cloneDefaultValue,
e.g.:
value: AnObjectOrArrayReference
cloneDefaultValue: true|false|"deep"|"shallow"
If the cloneDefaultValue property is not defined, Base will clone
any Arrays or Object literals which are used as default values when
configuring attributes for an instance, so that updates to instance
values do not modify the default value.
This behavior can be over-ridden using the cloneDefaultValue property:
Use
Y.clone to protect the default value.
Use
Y.merge, to protect the default value.
Don't clone Arrays or Object literals. The value is intended
to be used by reference, for example, when it points to
for a class). Replaces static PLUGINS array, allowing subclasses to
easily unplug static plugins added higher up in the hierarchy.
* Base adds all attributes lazily. This means attributes don't get
initialized until the first call to
get/set, speeding up construction
Attributes which have setters which set some other state in the object,
can configure the attribute to disable lazy initialization, by setting
lazyAdd:false as part of their attribute configuration, so that the setter
gets invoked during construction.
3.0.0PR1 - Initial release