webgui/www/extras/yui/docs/YAHOO.html
JT Smith 20f8df1291 upgrading to YUI 2.6
data tables are going to need some work yet, but the other stuff seems to be working 100%
2008-10-22 23:53:29 +00:00

549 lines
25 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>API: yahoo YAHOO (YUI Library)</title>
<link rel="stylesheet" type="text/css" href="assets/api.css">
<script type="text/javascript" src="assets/api-js"></script>
<script type="text/javascript" src="assets/ac-js"></script>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<a href="http://developer.yahoo.com/yui/"><h1>Yahoo! UI Library</h1></a>
<h3>YAHOO Global&nbsp; <span class="subtitle">2.6.0</span></h3>
<p>
<a href="./index.html">Yahoo! UI Library</a>
&gt; <a href="./module_yahoo.html">yahoo</a>
&gt; YAHOO
</p>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form name="yui-classopts-form">
<span id="classopts"><input type="checkbox" name="showprivate" id="showprivate" /> <label for="showprivate">Show Private</label></span>
<span id="classopts"><input type="checkbox" name="showprotected" id="showprotected" /> <label for="showprotected">Show Protected</label></span>
<span id="classopts"><input type="checkbox" name="showdeprecated" id="showdeprecated" /> <label for="showdeprecated">Show Deprecated</label></span>
</form>
<h2>
<code>static</code>
Class <b>YAHOO</b>
<span class="extends">
</span>
<span class="extends">
</span>
</code>
</h2>
<!-- class tree goes here -->
<div class="summary description">
The YAHOO global namespace object. If YAHOO is already defined, the
existing YAHOO object will not be overwritten so that defined
namespaces are preserved.
</div>
<div class="section method details">
<h3 id="methods">Methods</h3>
<div class="content">
<div class="">
<h4>
<a name="method_augment">augment</a></h4>
<div class="detail">
<code>
static
void
<strong>augment</strong>
(
r
,
s
,
arguments
)
</code>
<div class="description">
An alias for <a href="YAHOO.lang.html#augment">YAHOO.lang.augment</a>
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>r &lt;Function&gt;</code>
the object to receive the augmentation
</dd>
<dd>
<code>s &lt;Function&gt;</code>
the object that supplies the properties to augment
</dd>
<dd>
<code>arguments &lt;String*&gt;</code>
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
</dd>
</dl>
<dl>
<dt>Returns:
<code>
void
</code></dt>
<dd></dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_extend">extend</a></h4>
<div class="detail">
<code>
static
void
<strong>extend</strong>
(
subc
,
superc
,
overrides
)
</code>
<div class="description">
An alias for <a href="YAHOO.lang.html#extend">YAHOO.lang.extend</a>
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>subc &lt;Function&gt;</code>
the object to modify
</dd>
<dd>
<code>superc &lt;Function&gt;</code>
the object to inherit
</dd>
<dd>
<code>overrides &lt;Object&gt;</code>
additional properties/methods to add to the
subclass prototype. These will override the
matching items obtained from the superclass if present.
</dd>
</dl>
<dl>
<dt>Returns:
<code>
void
</code></dt>
<dd></dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_log">log</a></h4>
<div class="detail">
<code>
static
Boolean
<strong>log</strong>
(
msg
,
cat
,
src
)
</code>
<div class="description">
Uses YAHOO.widget.Logger to output a log message, if the widget is
available.
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>msg &lt;String&gt;</code>
The message to log.
</dd>
<dd>
<code>cat &lt;String&gt;</code>
The log category for the message. Default
categories are "info", "warn", "error", time".
Custom categories can be used as well. (opt)
</dd>
<dd>
<code>src &lt;String&gt;</code>
The source of the the message (opt)
</dd>
</dl>
<dl>
<dt>Returns:
<code>
Boolean
</code></dt>
<dd>True if the log operation was successful.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_namespace">namespace</a></h4>
<div class="detail">
<code>
static
Object
<strong>namespace</strong>
(
arguments
)
</code>
<div class="description">
Returns the namespace specified and creates it if it doesn't exist
<pre>
YAHOO.namespace("property.package");
YAHOO.namespace("YAHOO.property.package");
</pre>
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:
<pre>
YAHOO.namespace("really.long.nested.namespace");
</pre>
This fails because "long" is a future reserved word in ECMAScript
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>arguments &lt;String*&gt;</code>
1-n namespaces to create
</dd>
</dl>
<dl>
<dt>Returns:
<code>
Object
</code></dt>
<dd>A reference to the last namespace object created</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_register">register</a></h4>
<div class="detail">
<code>
static
void
<strong>register</strong>
(
name
,
mainClass
,
data
)
</code>
<div class="description">
Registers a module with the YAHOO object
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>name &lt;String&gt;</code>
the name of the module (event, slider, etc)
</dd>
<dd>
<code>mainClass &lt;Function&gt;</code>
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
</dd>
<dd>
<code>data &lt;Object&gt;</code>
metadata object for the module. Currently it
is expected to contain a "version" property
and a "build" property at minimum.
</dd>
</dl>
<dl>
<dt>Returns:
<code>
void
</code></dt>
<dd></dd>
</dl>
</div>
</div>
<hr />
</div>
</div>
</div>
</div>
</div>
<div class="yui-b">
<div class="nav">
<div class="module">
<h4>Modules</h4>
<ul class="content">
<li class=""><a href="module_animation.html">animation</a></li>
<li class=""><a href="module_autocomplete.html">autocomplete</a></li>
<li class=""><a href="module_button.html">button</a></li>
<li class=""><a href="module_calendar.html">calendar</a></li>
<li class=""><a href="module_carousel.html">carousel</a></li>
<li class=""><a href="module_charts.html">charts</a></li>
<li class=""><a href="module_colorpicker.html">colorpicker</a></li>
<li class=""><a href="module_connection.html">connection</a></li>
<li class=""><a href="module_container.html">container</a></li>
<li class=""><a href="module_cookie.html">cookie</a></li>
<li class=""><a href="module_datasource.html">datasource</a></li>
<li class=""><a href="module_datatable.html">datatable</a></li>
<li class=""><a href="module_dom.html">dom</a></li>
<li class=""><a href="module_dragdrop.html">dragdrop</a></li>
<li class=""><a href="module_editor.html">editor</a></li>
<li class=""><a href="module_element.html">element</a></li>
<li class=""><a href="module_event.html">event</a></li>
<li class=""><a href="module_get.html">get</a></li>
<li class=""><a href="module_history.html">history</a></li>
<li class=""><a href="module_imagecropper.html">imagecropper</a></li>
<li class=""><a href="module_imageloader.html">imageloader</a></li>
<li class=""><a href="module_json.html">json</a></li>
<li class=""><a href="module_layout.html">layout</a></li>
<li class=""><a href="module_logger.html">logger</a></li>
<li class=""><a href="module_menu.html">menu</a></li>
<li class=""><a href="module_paginator.html">paginator</a></li>
<li class=""><a href="module_profiler.html">profiler</a></li>
<li class=""><a href="module_profilerviewer.html">profilerviewer</a></li>
<li class=""><a href="module_resize.html">resize</a></li>
<li class=""><a href="module_selector.html">selector</a></li>
<li class=""><a href="module_slider.html">slider</a></li>
<li class=""><a href="module_tabview.html">tabview</a></li>
<li class=""><a href="module_treeview.html">treeview</a></li>
<li class=""><a href="module_uploader.html">uploader</a></li>
<li class="selected"><a href="module_yahoo.html">yahoo</a></li>
<li class=""><a href="module_yuiloader.html">yuiloader</a></li>
<li class=""><a href="module_yuitest.html">yuitest</a></li>
</ul>
</div>
<div class="module">
<h4>Classes</h4>
<ul class="content">
<li class="selected"><a href="YAHOO.html">YAHOO</a></li>
<li class=""><a href="YAHOO.env.html">YAHOO.env</a></li>
<li class=""><a href="YAHOO.env.ua.html">YAHOO.env.ua</a></li>
<li class=""><a href="YAHOO.lang.html">YAHOO.lang</a></li>
<li class=""><a href="YAHOO_config.html">YAHOO_config</a></li>
</ul>
</div>
<div class="module">
<h4>Files</h4>
<ul class="content">
<li class=""><a href="Env.js.html">Env.js</a></li>
<li class=""><a href="Lang.js.html">Lang.js</a></li>
<li class=""><a href="YAHOO.js.html">YAHOO.js</a></li>
</ul>
</div>
<div class="module">
<h4>Methods</h4>
<ul class="content">
<li class=""><!--<code>void</code>-->
<a href="#method_augment">augment</a>
</li>
<li class=""><!--<code>void</code>-->
<a href="#method_extend">extend</a>
</li>
<li class=""><!--<code>Boolean</code>-->
<a href="#method_log">log</a>
</li>
<li class=""><!--<code>Object</code>-->
<a href="#method_namespace">namespace</a>
</li>
<li class=""><!--<code>void</code>-->
<a href="#method_register">register</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright &copy; 2008 Yahoo! Inc. All rights reserved.
</div>
</div>
</body>
</html>