BaseBuild.js revision b66fb0b516da11d7d0a3e6151dab92af15eac49c
L = Y.Lang,
if (s[prop]) {
if (initializer) {
if (destructor) {
if (px) {
if (sx) {
if (dynamic) {
return builtClass;
var aggregates,
aggr,
if (cfg) {
if (statics) {
if (aggregates) {
if (custom) {
for (i in custom) {
custom[i](i, r, s);
function BuiltClass() {
return BuiltClass;
if (!buildCfg) {
return builtClass;
var aggr = [],
cust = {},
statics = [],
c = main,
while (c && c.prototype) {
if (buildCfg) {
if (exts) {
c = exts[i];
if (buildCfg) {
if (cfgAggr) {
if (cfgCustBuild) {
if (cfgStatics) {
return sxclone;
* @param {Function} name The name of the new class. Used to defined the NAME property for the new class.
* augmented/aggregated to the built class.
* Creates a new class (constructor function) which extends the base class passed in as the second argument,
* Prototype properties or methods can be added to the new class, using the px argument (similar to Y.extend).
* Static properties or methods can be added to the new class, using the sx argument (similar to Y.extend).
* **NOTE FOR COMPONENT DEVELOPERS**: Both the `base` class, and `extensions` can define static a `_buildCfg`
* property, which acts as class creation meta-data, and drives how special static properties from the base
* The `_buildCfg` property is a hash with 3 supported properties: `statics`, `aggregates` and `custom`, e.g:
* // Static properties/methods to copy (Alias) to the built class.
* This way, when users pass your base or extension class to `Y.Base.create` or `Y.Base.mix`, they don't need to
* know which properties need special handling. `Y.Base` has a buildCfg which defines `ATTRS` for custom mix handling
* (to protect the static config objects), and `Y.Widget` has a buildCfg which specifies `HTML_PARSER` for
* @param {Function} name The name of the newly created class. Used to defined the NAME property for the new class.
* @param {Function} main The base class which the new class should extend. This class needs to be Base or a class derived from base (e.g. Widget).
* @param {Object} px The set of prototype properties/methods to add to the built class.
* @param {Object} sx The set of static properties/methods to add to the built class.
* @param {Function} main The existing class into which the extensions should be mixed. The class needs to be Base or a class derived from Base (e.g. Widget)
* @param {Function[]} extensions The set of extension classes which will mixed into the existing main class.
custom : {
if (s.ATTRS) {
for (a in sAttrs) {