YUI Library Home

Site Search (YDN & YUIBlog):

# YUI Library Examples: YAHOO Global Object

# YAHOO Global Object: Examples

The YAHOO Global Object lives at the top of the namespace tree for all YUI components. It also includes some utility methods for type-checking, user-agent detection, and module extension.

- Type-Checking Your Data: Use the `YAHOO.lang` type checking methods to deal with unpredictable data
- User Agent Detection: `YAHOO.env.ua` can tell you with some accuracy which browser your page is being viewed in.
- Creating Class Hierarchies with `YAHOO.lang.extend`: Leverage class inheritance in an object-oriented architecture.
- Creating a Composition-Based Class Structure Using `YAHOO.lang.augmentProto`: Use `YAHOO.lang.augmentProto` to help modularize class behaviors.
- Add Behavior to Objects or Static Classes with `YAHOO.lang.augmentObject`: Use `augmentObject` to extend static classes, object literals, or class instances.
- Combining Simple Data Sets with `YAHOO.lang.merge`: Merge several objects, creating a unique set.

### YAHOO Global Object:

- User's Guide (external)
- API Documentation

Copyright © 2010 Yahoo! Inc. All rights reserved.

Privacy Policy - Terms of Service - Copyright Policy - Job Openings