Yahoo! UI Library

YAHOO Global 

Yahoo! UI Library > yahoo > YAHOO

static Class YAHOO

The YAHOO global namespace object



static void augment ( r , s , arguments )
Applies all prototype properties in the supplier to the receiver if the receiver does not have these properties yet. Optionally, one or more methods/properties can be specified (as additional parameters). This option will overwrite the property if receiver has it already.
r <Function> the object to receive the augmentation
s <Function> the object that supplies the properties to augment
arguments <String*> zero or more properties methods to augment the receiver with. If none specified, everything in the supplier will be used unless it would overwrite an existing property in the receiver
Returns: void


static void extend ( subc , superc , overrides )
Utility to set up the prototype, constructor and superclass properties to support an inheritance strategy that can chain constructors and methods.
subc <Function> the object to modify
superc <Function> the object to inherit
overrides <Object> additional properties/methods to add to the subclass prototype. These will override the matching items obtained from the superclass if present.
Returns: void


static Boolean log ( msg , cat , src )
Uses YAHOO.widget.Logger to output a log message, if the widget is available.
msg <String> The message to log.
cat <String> The log category for the message. Default categories are "info", "warn", "error", time". Custom categories can be used as well. (opt)
src <String> The source of the the message (opt)
Returns: Boolean
True if the log operation was successful.


static Object namespace ( arguments )
Returns the namespace specified and creates it if it doesn't exist
Either of the above would create, then Be careful when naming packages. Reserved words may work in some browsers and not others. For instance, the following will fail in Safari:
This fails because "long" is a future reserved word in ECMAScript
arguments <String*> 1-n namespaces to create
Returns: Object
A reference to the last namespace object created

Copyright © 2006 Yahoo! Inc. All rights reserved.