tags:

views:

37

answers:

1
+1  Q: 

YUI config object

I noticed reading the YUI documentation that it says:

YUI ( o* )

Parameters: o* Up to five optional configuration objects. This object is stored in YUI.config. See config for the list of supported properties.

What would be the reasoning behind limiting it to 5 configuration objects? There are appear to be more than 5 possibilities when looking at the config class, so why limit?

+2  A: 

That means it supports YUI({ someConfig: value }, { anotherConfig: value }, { aThird: config }, { aFourth: config, { andFinally: aFifth });

Each object can contain any amount of configuration. The constructor supports multiple config objects for flexibility in larger systems, but is limited to five for code size maintenance. It's very unlikely implementers will use even a second config object since more complex apps can simply build up a single config object prior to YUI instantiation.

If a real need arises to have more than five, a reasonably justified feature request could be submitted to raise the limit. Personally, I don't see this happening.

Luke