Namespace YAHOO
YAHOO
Defined in: yahoo.js.
Constructor Attributes | Constructor Name and Description |
---|---|
The YAHOO global namespace object.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
YAHOO.augment
An alias for YAHOO.lang.augment
|
<static> |
YAHOO.extend
An alias for YAHOO.lang.extend
|
Method Attributes | Method Name and Description |
---|---|
<static> |
YAHOO.init()
Initializes the global by creating the default namespaces and applying
any new configuration information that is detected.
|
<static> |
YAHOO.log(msg, cat, src)
Uses YAHOO.widget.Logger to output a log message, if the widget is
available.
|
<static> |
YAHOO.namespace(arguments)
Returns the namespace specified and creates it if it doesn't exist
YAHOO.namespace("property.package"); YAHOO.namespace("YAHOO.property.package");Either of the above would create YAHOO.property, then YAHOO.property.package Be careful when naming packages. |
<static> |
YAHOO.register(name, mainClass, data)
Registers a module with the YAHOO object
|
Namespace Detail
YAHOO
The YAHOO global namespace object. If YAHOO is already defined, the
existing YAHOO object will not be overwritten so that defined
namespaces are preserved.
Field Detail
<static>
YAHOO.augment
An alias for YAHOO.lang.augment
<static>
YAHOO.extend
An alias for YAHOO.lang.extend
Method Detail
<static>
YAHOO.init()
Initializes the global by creating the default namespaces and applying
any new configuration information that is detected.
<static>
{Boolean}
YAHOO.log(msg, cat, src)
Uses YAHOO.widget.Logger to output a log message, if the widget is
available.
- Parameters:
- {String} msg
- The message to log.
- {String} cat
- The log category for the message. Default categories are "info", "warn", "error", time". Custom categories can be used as well. (opt)
- {String} src
- The source of the the message (opt)
- Returns:
- {Boolean} True if the log operation was successful.
<static>
{Object}
YAHOO.namespace(arguments)
Returns the namespace specified and creates it if it doesn't exist
YAHOO.namespace("property.package"); YAHOO.namespace("YAHOO.property.package");Either of the above would create YAHOO.property, then YAHOO.property.package Be careful when naming packages. Reserved words may work in some browsers and not others. For instance, the following will fail in Safari:
YAHOO.namespace("really.long.nested.namespace");This fails because "long" is a future reserved word in ECMAScript
- Parameters:
- {String*} arguments
- 1-n namespaces to create
- Returns:
- {Object} A reference to the last namespace object created
<static>
YAHOO.register(name, mainClass, data)
Registers a module with the YAHOO object
- Parameters:
- {String} name
- the name of the module (event, slider, etc)
- {Function} mainClass
- a reference to class in the module. This class will be tagged with the version info so that it will be possible to identify the version that is in use when multiple versions have loaded
- {Object} data
- metadata object for the module. Currently it is expected to contain a "version" property and a "build" property at minimum.