yui.js.html revision f6d14b3bf6e08e09949f6a1e7d5431b7829f3550
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>API: yui yui.js (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>yui&nbsp; <span class="subtitle">3.00PR1</span></h3>
<p>
<a href="/index.html">Yahoo! UI Library</a>
&gt; <a href="/module_yui.html">yui</a>
&gt; yui.js (source view)
</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" /> Show Private</span>
<span id="classopts"><input type="checkbox" name="showprotected" id="showprotected" /> Show Protected</span>
<span id="classopts"><input type="checkbox" name="showdeprecated" id="showdeprecated" /> Show Deprecated</span>
</form>
<div id="srcout">
<style>
#doc3 #classopts { display:none; }
</style>
<div class="highlight" ><pre><span class="o">(</span><span class="k">function</span><span class="o">()</span> <span class="o">{</span>
<span class="k">var</span> <span class="nx">_instances</span> <span class="o">=</span> <span class="o">{},</span>
<span class="c">// @TODO: this needs to be created at build time from module metadata</span>
<span class="c"></span>
<span class="nx">_APPLY_TO_WHITE_LIST</span> <span class="o">=</span> <span class="o">{</span>
<span class="s1">&#39;io.xdrReady&#39;</span><span class="o">:</span> <span class="m">1</span><span class="o">,</span>
<span class="s1">&#39;io.start&#39;</span><span class="o">:</span> <span class="m">1</span><span class="o">,</span>
<span class="s1">&#39;io.success&#39;</span><span class="o">:</span> <span class="m">1</span><span class="o">,</span>
<span class="s1">&#39;io.failure&#39;</span><span class="o">:</span> <span class="m">1</span><span class="o">,</span>
<span class="s1">&#39;io.abort&#39;</span><span class="o">:</span> <span class="m">1</span>
<span class="o">};</span>
<span class="k">if</span> <span class="o">(</span><span class="k">typeof</span> <span class="nx">YUI</span> <span class="o">===</span> <span class="s1">&#39;undefined&#39;</span> <span class="o">||</span> <span class="o">!</span><span class="nx">YUI</span><span class="o">)</span> <span class="o">{</span>
<span class="c">/**</span>
<span class="c"> * The YUI global namespace object. If YUI is already defined, the</span>
<span class="c"> * existing YUI object will not be overwritten so that defined</span>
<span class="c"> * namespaces are preserved. </span>
<span class="c"> * @class YUI</span>
<span class="c"> * @constructor</span>
<span class="c"> * @global</span>
<span class="c"> * @uses Event.Target</span>
<span class="c"> * @param o configuration object</span>
<span class="c"> */</span>
<span class="c">/*global YUI*/</span>
<span class="nx">YUI</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>
<span class="k">var</span> <span class="nx">Y</span> <span class="o">=</span> <span class="k">this</span><span class="o">;</span>
<span class="c">// Allow var yui = YUI() instead of var yui = new YUI()</span>
<span class="c"></span> <span class="k">if</span> <span class="o">(</span><span class="nx">Y</span> <span class="o">==</span> <span class="nb">window</span><span class="o">)</span> <span class="o">{</span>
<span class="k">return</span> <span class="k">new</span> <span class="nx">YUI</span><span class="o">(</span><span class="nx">o</span><span class="o">);</span>
<span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
<span class="c">// set up the core environment</span>
<span class="c"></span> <span class="nx">Y</span><span class="o">.</span><span class="nx">_init</span><span class="o">(</span><span class="nx">o</span><span class="o">);</span>
<span class="c">// bind the specified additional modules for this instance</span>
<span class="c"></span> <span class="nx">Y</span><span class="o">.</span><span class="nx">_setup</span><span class="o">();</span>
<span class="o">}</span>
<span class="o">};</span>
<span class="o">}</span>
<span class="c">// The prototype contains the functions that are required to allow the external</span>
<span class="c">// modules to be registered and for the instance to be initialized.</span>
<span class="c"></span><span class="nx">YUI</span><span class="o">.</span><span class="nx">prototype</span> <span class="o">=</span> <span class="o">{</span>
<span class="c">/**</span>
<span class="c"> * Initialize this YUI instance</span>
<span class="c"> * @param o config options</span>
<span class="c"> * @private</span>
<span class="c"> */</span>
<span class="nx">_init</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>
<span class="c">// @todo</span>
<span class="c"></span> <span class="c">// loadcfg {</span>
<span class="c"></span> <span class="c">// base</span>
<span class="c"></span> <span class="c">// securebase</span>
<span class="c"></span> <span class="c">// filter</span>
<span class="c"></span> <span class="c">// win</span>
<span class="c"></span> <span class="c">// doc</span>
<span class="c"></span> <span class="c">// debug</span>
<span class="c"></span> <span class="c">// useConsole</span>
<span class="c"></span> <span class="c">// logInclude</span>
<span class="c"></span> <span class="c">// logExclude</span>
<span class="c"></span> <span class="c">// throwFail</span>
<span class="c"></span> <span class="c">// pollInterval</span>
<span class="c"></span> <span class="c">// core</span>
<span class="c"></span> <span class="c">// }</span>
<span class="c"></span>
<span class="nx">o</span> <span class="o">=</span> <span class="nx">o</span> <span class="o">||</span> <span class="o">{};</span>
<span class="c">// find targeted window and @TODO create facades</span>
<span class="c"></span> <span class="k">var</span> <span class="nx">w</span> <span class="o">=</span> <span class="o">(</span><span class="nx">o</span><span class="o">.</span><span class="nx">win</span><span class="o">)</span> <span class="o">?</span> <span class="o">(</span><span class="nx">o</span><span class="o">.</span><span class="nx">win</span><span class="o">.</span><span class="nx">contentWindow</span><span class="o">)</span> <span class="o">:</span> <span class="nx">o</span><span class="o">.</span><span class="nx">win</span> <span class="o">||</span> <span class="nb">window</span><span class="o">;</span>
<span class="nx">o</span><span class="o">.</span><span class="nx">win</span> <span class="o">=</span> <span class="nx">w</span><span class="o">;</span>
<span class="nx">o</span><span class="o">.</span><span class="nx">doc</span> <span class="o">=</span> <span class="nx">w</span><span class="o">.</span><span class="nb">document</span><span class="o">;</span>
<span class="nx">o</span><span class="o">.</span><span class="nx">debug</span> <span class="o">=</span> <span class="o">(</span><span class="s1">&#39;debug&#39;</span> <span class="k">in</span> <span class="nx">o</span><span class="o">)</span> <span class="o">?</span> <span class="nx">o</span><span class="o">.</span><span class="nx">debug</span> <span class="o">:</span> <span class="kc">true</span><span class="o">;</span>
<span class="nx">o</span><span class="o">.</span><span class="nx">useConsole</span> <span class="o">=</span> <span class="o">(</span><span class="s1">&#39;useConsole&#39;</span> <span class="k">in</span> <span class="nx">o</span><span class="o">)</span> <span class="o">?</span> <span class="nx">o</span><span class="o">.</span><span class="nx">debug</span> <span class="o">:</span> <span class="kc">true</span><span class="o">;</span>
<span class="c">// add a reference to o for anything that needs it</span>
<span class="c"></span> <span class="c">// before _setup is called.</span>
<span class="c"></span> <span class="k">this</span><span class="o">.</span><span class="nx">config</span> <span class="o">=</span> <span class="nx">o</span><span class="o">;</span>
<span class="k">this</span><span class="o">.</span><span class="nx">Env</span> <span class="o">=</span> <span class="o">{</span>
<span class="c">// @todo expand the new module metadata</span>
<span class="c"></span> <span class="nx">mods</span><span class="o">:</span> <span class="o">{},</span>
<span class="nx">_idx</span><span class="o">:</span> <span class="m">0</span><span class="o">,</span>
<span class="nx">_pre</span><span class="o">:</span> <span class="s1">&#39;yuid&#39;</span><span class="o">,</span>
<span class="nx">_used</span><span class="o">:</span> <span class="o">{},</span>
<span class="nx">_yidx</span><span class="o">:</span> <span class="m">0</span><span class="o">,</span>
<span class="nx">_uidx</span><span class="o">:</span> <span class="m">0</span>
<span class="o">};</span>
<span class="k">if</span> <span class="o">(</span><span class="nx">YUI</span><span class="o">.</span><span class="nx">Env</span><span class="o">)</span> <span class="o">{</span>
<span class="k">this</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">_yidx</span> <span class="o">=</span> <span class="o">++</span><span class="nx">YUI</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">_idx</span><span class="o">;</span>
<span class="k">this</span><span class="o">.</span><span class="nx">id</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">stamp</span><span class="o">(</span><span class="k">this</span><span class="o">);</span>
<span class="nx">_instances</span><span class="o">[</span><span class="k">this</span><span class="o">.</span><span class="nx">id</span><span class="o">]</span> <span class="o">=</span> <span class="k">this</span><span class="o">;</span>
<span class="o">}</span>
<span class="k">this</span><span class="o">.</span><span class="nx">constructor</span> <span class="o">=</span> <span class="nx">YUI</span><span class="o">;</span>
<span class="k">this</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">id</span> <span class="o">+</span> <span class="s1">&#39;) init &#39;</span><span class="o">);</span>
<span class="o">},</span>
<span class="c">/**</span>
<span class="c"> * Finishes the instance setup. Attaches whatever modules were defined</span>
<span class="c"> * when the yui modules was registered.</span>
<span class="c"> * @method _setup</span>
<span class="c"> * @private</span>
<span class="c"> */</span>
<span class="nx">_setup</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>
<span class="k">this</span><span class="o">.</span><span class="nx">use</span><span class="o">(</span><span class="s2">&quot;yui&quot;</span><span class="o">);</span>
<span class="c">// make a shallow copy of the config. This won&#39;t fix nested configs</span>
<span class="c"></span> <span class="c">// so we need to determine if we only allow one level (probably) or</span>
<span class="c"></span> <span class="c">// if we make clone create references for functions and elements.</span>
<span class="c"></span> <span class="k">this</span><span class="o">.</span><span class="nx">config</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">merge</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">config</span><span class="o">);</span>
<span class="c">// this.mix(c, {</span>
<span class="c"></span> <span class="c">// debug: true,</span>
<span class="c"></span> <span class="c">// useConsole: true</span>
<span class="c"></span> <span class="c">// // , throwFail: false</span>
<span class="c"></span> <span class="c">// });</span>
<span class="c"></span> <span class="c">// this.config = c;</span>
<span class="c"></span>
<span class="c">// this.publish(&#39;yui:load&#39;);</span>
<span class="c"></span> <span class="c">// this.publish(&#39;yui:log&#39;, {</span>
<span class="c"></span> <span class="c">// silent: true</span>
<span class="c"></span> <span class="c">// });</span>
<span class="c"></span> <span class="o">},</span>
<span class="c">/**</span>
<span class="c"> * Executes a method on a YUI instance with</span>
<span class="c"> * the specified id.</span>
<span class="c"> * @method applyTo</span>
<span class="c"> * @param id {string} the YUI instance id</span>
<span class="c"> * @param method {string} the name of the method to exectute.</span>
<span class="c"> * Ex: &#39;Object.keys&#39;</span>
<span class="c"> * @param args {Array} the arguments to apply to the method</span>
<span class="c"> * @return the return value from the applied method or null</span>
<span class="c"> */</span>
<span class="nx">applyTo</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">id</span><span class="o">,</span> <span class="nx">method</span><span class="o">,</span> <span class="nx">args</span><span class="o">)</span> <span class="o">{</span>
<span class="k">if</span> <span class="o">(!(</span><span class="nx">method</span> <span class="k">in</span> <span class="nx">_APPLY_TO_WHITE_LIST</span><span class="o">))</span> <span class="o">{</span>
<span class="k">this</span><span class="o">.</span><span class="nx">fail</span><span class="o">(</span><span class="nx">method</span> <span class="o">+</span> <span class="s1">&#39;: applyTo not allowed&#39;</span><span class="o">);</span>
<span class="k">return</span> <span class="kc">null</span><span class="o">;</span>
<span class="o">}</span>
<span class="k">var</span> <span class="nx">instance</span> <span class="o">=</span> <span class="nx">_instances</span><span class="o">[</span><span class="nx">id</span><span class="o">];</span>
<span class="k">if</span> <span class="o">(</span><span class="nx">instance</span><span class="o">)</span> <span class="o">{</span>
<span class="k">var</span> <span class="nx">nest</span> <span class="o">=</span> <span class="nx">method</span><span class="o">.</span><span class="nx">split</span><span class="o">(</span><span class="s1">&#39;.&#39;</span><span class="o">),</span> <span class="nx">m</span> <span class="o">=</span> <span class="nx">instance</span><span class="o">;</span>
<span class="k">for</span> <span class="o">(</span><span class="k">var</span> <span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">nest</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">m</span> <span class="o">=</span> <span class="nx">m</span><span class="o">[</span><span class="nx">nest</span><span class="o">[</span><span class="nx">i</span><span class="o">]];</span>
<span class="k">if</span> <span class="o">(!</span><span class="nx">m</span><span class="o">)</span> <span class="o">{</span>
<span class="k">this</span><span class="o">.</span><span class="nx">fail</span><span class="o">(</span><span class="s1">&#39;applyTo failure: &#39;</span> <span class="o">+</span> <span class="nx">method</span><span class="o">);</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="k">return</span> <span class="nx">m</span><span class="o">.</span><span class="nx">apply</span><span class="o">(</span><span class="nx">instance</span><span class="o">,</span> <span class="nx">args</span><span class="o">);</span>
<span class="o">}</span>
<span class="k">return</span> <span class="kc">null</span><span class="o">;</span>
<span class="o">},</span>
<span class="c">/**</span>
<span class="c"> * Register a module</span>
<span class="c"> * @method add</span>
<span class="c"> * @param name {string} module name</span>
<span class="c"> * @param namespace {string} name space for the module</span>
<span class="c"> * @param fn {Function} entry point into the module that</span>
<span class="c"> * is used to bind module to the YUI instance</span>
<span class="c"> * @param version {string} version string</span>
<span class="c"> * @return {YUI} the YUI instance</span>
<span class="c"> *</span>
<span class="c"> * requires - features that should be present before loading</span>
<span class="c"> * optional - optional features that should be present if load optional defined</span>
<span class="c"> * use - features that should be attached automatically</span>
<span class="c"> * skinnable -</span>
<span class="c"> * rollup</span>
<span class="c"> * omit - features that should not be loaded if this module is present</span>
<span class="c"> */</span>
<span class="nx">add</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">name</span><span class="o">,</span> <span class="nx">fn</span><span class="o">,</span> <span class="nx">version</span><span class="o">,</span> <span class="nx">details</span><span class="o">)</span> <span class="o">{</span>
<span class="c">// this.log(&#39;Adding a new component &#39; + name);</span>
<span class="c"></span>
<span class="c">// @todo expand this to include version mapping</span>
<span class="c"></span>
<span class="c">// @todo allow requires/supersedes</span>
<span class="c"></span>
<span class="c">// @todo may want to restore the build property</span>
<span class="c"></span>
<span class="c">// @todo fire moduleAvailable event</span>
<span class="c"></span>
<span class="k">var</span> <span class="nx">m</span> <span class="o">=</span> <span class="o">{</span>
<span class="nx">name</span><span class="o">:</span> <span class="nx">name</span><span class="o">,</span>
<span class="nx">fn</span><span class="o">:</span> <span class="nx">fn</span><span class="o">,</span>
<span class="nx">version</span><span class="o">:</span> <span class="nx">version</span><span class="o">,</span>
<span class="nx">details</span><span class="o">:</span> <span class="nx">details</span> <span class="o">||</span> <span class="o">{}</span>
<span class="o">};</span>
<span class="nx">YUI</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">mods</span><span class="o">[</span><span class="nx">name</span><span class="o">]</span> <span class="o">=</span> <span class="nx">m</span><span class="o">;</span>
<span class="k">return</span> <span class="k">this</span><span class="o">;</span> <span class="c">// chain support</span>
<span class="c"></span> <span class="o">},</span>
<span class="c">/**</span>
<span class="c"> * Bind a module to a YUI instance</span>
<span class="c"> * @param modules* {string} 1-n modules to bind (uses arguments array)</span>
<span class="c"> * @param *callback {function} callback function executed when </span>
<span class="c"> * the instance has the required functionality. If included, it</span>
<span class="c"> * must be the last parameter.</span>
<span class="c"> *</span>
<span class="c"> * @TODO </span>
<span class="c"> * Implement versioning? loader can load different versions?</span>
<span class="c"> * Should sub-modules/plugins be normal modules, or do</span>
<span class="c"> * we add syntax for specifying these?</span>
<span class="c"> *</span>
<span class="c"> * YUI().use(&#39;dragdrop&#39;)</span>
<span class="c"> * YUI().use(&#39;dragdrop:2.4.0&#39;); // specific version</span>
<span class="c"> * YUI().use(&#39;dragdrop:2.4.0-&#39;); // at least this version</span>
<span class="c"> * YUI().use(&#39;dragdrop:2.4.0-2.9999.9999&#39;); // version range</span>
<span class="c"> * YUI().use(&#39;*&#39;); // use all available modules</span>
<span class="c"> * YUI().use(&#39;lang+dump+substitute&#39;); // use lang and some plugins</span>
<span class="c"> * YUI().use(&#39;lang+*&#39;); // use lang and all known plugins</span>
<span class="c"> *</span>
<span class="c"> *</span>
<span class="c"> * @return {YUI} the YUI instance</span>
<span class="c"> */</span>
<span class="nx">use</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
<span class="k">var</span> <span class="nx">Y</span> <span class="o">=</span> <span class="k">this</span><span class="o">,</span>
<span class="nx">a</span><span class="o">=</span><span class="nb">Array</span><span class="o">.</span><span class="nx">prototype</span><span class="o">.</span><span class="nx">slice</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="nx">arguments</span><span class="o">,</span> <span class="m">0</span><span class="o">),</span>
<span class="nx">mods</span> <span class="o">=</span> <span class="nx">YUI</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">mods</span><span class="o">,</span>
<span class="nx">used</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">_used</span><span class="o">,</span>
<span class="nx">loader</span><span class="o">,</span>
<span class="nx">firstArg</span> <span class="o">=</span> <span class="nx">a</span><span class="o">[</span><span class="m">0</span><span class="o">],</span>
<span class="nx">dynamic</span> <span class="o">=</span> <span class="kc">false</span><span class="o">,</span>
<span class="nx">sorted</span> <span class="o">=</span> <span class="kc">false</span><span class="o">,</span>
<span class="nx">callback</span> <span class="o">=</span> <span class="nx">a</span><span class="o">[</span><span class="nx">a</span><span class="o">.</span><span class="nx">length</span><span class="o">-</span><span class="m">1</span><span class="o">];</span>
<span class="c">// The last argument supplied to use can be a load complete callback</span>
<span class="c"></span> <span class="k">if</span> <span class="o">(</span><span class="k">typeof</span> <span class="nx">callback</span> <span class="o">===</span> <span class="s1">&#39;function&#39;</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">a</span><span class="o">.</span><span class="nx">pop</span><span class="o">();</span>
<span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
<span class="nx">callback</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
<span class="o">}</span>
<span class="c">// YUI().use(&#39;*&#39;); // bind everything available</span>
<span class="c"></span> <span class="k">if</span> <span class="o">(</span><span class="nx">firstArg</span> <span class="o">===</span> <span class="s2">&quot;*&quot;</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">a</span> <span class="o">=</span> <span class="o">[];</span>
<span class="k">for</span> <span class="o">(</span><span class="k">var</span> <span class="nx">k</span> <span class="k">in</span> <span class="nx">mods</span><span class="o">)</span> <span class="o">{</span>
<span class="k">if</span> <span class="o">(</span><span class="nx">mods</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">k</span><span class="o">))</span> <span class="o">{</span>
<span class="nx">a</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">k</span><span class="o">);</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="k">if</span> <span class="o">(</span><span class="nx">callback</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">a</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">callback</span><span class="o">);</span>
<span class="o">}</span>
<span class="k">return</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">use</span><span class="o">.</span><span class="nx">apply</span><span class="o">(</span><span class="nx">Y</span><span class="o">,</span> <span class="nx">a</span><span class="o">);</span>
<span class="c">// Accept a loader instance with a pre-sorted list of dependencies</span>
<span class="c"></span> <span class="o">}</span> <span class="k">else</span> <span class="k">if</span> <span class="o">(</span><span class="k">typeof</span> <span class="nx">firstArg</span> <span class="o">===</span> <span class="s1">&#39;object&#39;</span> <span class="o">&amp;&amp;</span> <span class="nx">firstArg</span><span class="o">.</span><span class="nx">sorted</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">a</span> <span class="o">=</span> <span class="nx">firstArg</span><span class="o">.</span><span class="nx">sorted</span><span class="o">;</span>
<span class="nx">sorted</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
<span class="o">}</span>
<span class="c">// Y.log(&#39;loader before: &#39; + a.join(&#39;,&#39;));</span>
<span class="c"></span>
<span class="c">// use loader to optimize and sort the requirements if it</span>
<span class="c"></span> <span class="c">// is available.</span>
<span class="c"></span> <span class="k">if</span> <span class="o">(!</span><span class="nx">sorted</span> <span class="o">&amp;&amp;</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Loader</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">dynamic</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
<span class="nx">loader</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Loader</span><span class="o">(</span><span class="nx">Y</span><span class="o">.</span><span class="nx">config</span><span class="o">);</span>
<span class="nx">loader</span><span class="o">.</span><span class="nx">require</span><span class="o">(</span><span class="nx">a</span><span class="o">);</span>
<span class="nx">loader</span><span class="o">.</span><span class="nx">ignoreRegistered</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
<span class="nx">loader</span><span class="o">.</span><span class="nx">calculate</span><span class="o">();</span>
<span class="nx">a</span> <span class="o">=</span> <span class="nx">loader</span><span class="o">.</span><span class="nx">sorted</span><span class="o">;</span>
<span class="o">}</span>
<span class="c">// Y.log(&#39;loader after: &#39; + a.join(&#39;,&#39;));</span>
<span class="c"></span>
<span class="k">var</span> <span class="nx">missing</span> <span class="o">=</span> <span class="o">[],</span> <span class="nx">r</span> <span class="o">=</span> <span class="o">[],</span> <span class="nx">f</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">name</span><span class="o">)</span> <span class="o">{</span>
<span class="c">// only attach a module once</span>
<span class="c"></span> <span class="k">if</span> <span class="o">(</span><span class="nx">used</span><span class="o">[</span><span class="nx">name</span><span class="o">])</span> <span class="o">{</span>
<span class="c">// Y.log(name + &#39; already used&#39;);</span>
<span class="c"></span> <span class="k">return</span><span class="o">;</span>
<span class="o">}</span>
<span class="k">var</span> <span class="nx">m</span> <span class="o">=</span> <span class="nx">mods</span><span class="o">[</span><span class="nx">name</span><span class="o">],</span> <span class="nx">j</span><span class="o">,</span> <span class="nx">req</span><span class="o">,</span> <span class="nx">use</span><span class="o">;</span>
<span class="k">if</span> <span class="o">(</span><span class="nx">m</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">used</span><span class="o">[</span><span class="nx">name</span><span class="o">]</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
<span class="k">if</span> <span class="o">(</span><span class="nx">dynamic</span><span class="o">)</span> <span class="o">{</span>
<span class="c">// Y.mix(l, YUI.Env.mods);</span>
<span class="c"></span> <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;attaching &#39;</span> <span class="o">+</span> <span class="nx">name</span><span class="o">);</span>
<span class="nx">m</span><span class="o">.</span><span class="nx">fn</span><span class="o">(</span><span class="nx">Y</span><span class="o">);</span>
<span class="o">}</span>
<span class="c">// Y.log(&#39;found &#39; + name);</span>
<span class="c"></span> <span class="nx">req</span> <span class="o">=</span> <span class="nx">m</span><span class="o">.</span><span class="nx">details</span><span class="o">.</span><span class="nx">requires</span><span class="o">;</span>
<span class="nx">use</span> <span class="o">=</span> <span class="nx">m</span><span class="o">.</span><span class="nx">details</span><span class="o">.</span><span class="nx">use</span><span class="o">;</span>
<span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
<span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;module not found: &#39;</span> <span class="o">+</span> <span class="nx">name</span><span class="o">,</span> <span class="s1">&#39;info&#39;</span><span class="o">,</span> <span class="s1">&#39;YUI&#39;</span><span class="o">);</span>
<span class="nx">missing</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">name</span><span class="o">);</span>
<span class="o">}</span>
<span class="c">// make sure requirements are attached</span>
<span class="c"></span> <span class="k">if</span> <span class="o">(</span><span class="nx">req</span><span class="o">)</span> <span class="o">{</span>
<span class="k">if</span> <span class="o">(</span><span class="nx">Y</span><span class="o">.</span><span class="nx">Lang</span><span class="o">.</span><span class="nx">isString</span><span class="o">(</span><span class="nx">req</span><span class="o">))</span> <span class="o">{</span>
<span class="nx">f</span><span class="o">(</span><span class="nx">req</span><span class="o">);</span>
<span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
<span class="k">for</span> <span class="o">(</span><span class="nx">j</span> <span class="o">=</span> <span class="m">0</span><span class="o">;</span> <span class="nx">j</span> <span class="o">&lt;</span> <span class="nx">req</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">j</span> <span class="o">=</span> <span class="nx">j</span> <span class="o">+</span> <span class="m">1</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">f</span><span class="o">(</span><span class="nx">req</span><span class="o">[</span><span class="nx">j</span><span class="o">]);</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="c">// add this module to full list of things to attach</span>
<span class="c"></span> <span class="c">// Y.log(&#39;using &#39; + name);</span>
<span class="c"></span> <span class="nx">r</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">name</span><span class="o">);</span>
<span class="c">// auto-attach sub-modules</span>
<span class="c"></span> <span class="k">if</span> <span class="o">(</span><span class="nx">use</span><span class="o">)</span> <span class="o">{</span>
<span class="k">if</span> <span class="o">(</span><span class="nx">Y</span><span class="o">.</span><span class="nx">Lang</span><span class="o">.</span><span class="nx">isString</span><span class="o">(</span><span class="nx">use</span><span class="o">))</span> <span class="o">{</span>
<span class="nx">f</span><span class="o">(</span><span class="nx">req</span><span class="o">);</span>
<span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
<span class="k">for</span> <span class="o">(</span><span class="nx">j</span> <span class="o">=</span> <span class="m">0</span><span class="o">;</span> <span class="nx">j</span> <span class="o">&lt;</span> <span class="nx">use</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">j</span> <span class="o">=</span> <span class="nx">j</span> <span class="o">+</span> <span class="m">1</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">f</span><span class="o">(</span><span class="nx">use</span><span class="o">[</span><span class="nx">j</span><span class="o">]);</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="o">};</span>
<span class="c">// process each requirement and any additional requirements </span>
<span class="c"></span> <span class="c">// the module metadata specifies</span>
<span class="c"></span> <span class="k">for</span> <span class="o">(</span><span class="k">var</span> <span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">,</span> <span class="nx">l</span><span class="o">=</span><span class="nx">a</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">l</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">f</span><span class="o">(</span><span class="nx">a</span><span class="o">[</span><span class="nx">i</span><span class="o">]);</span>
<span class="o">}</span>
<span class="c">// Y.log(&#39;all reqs: &#39; + r + &#39; --- missing: &#39; + missing);</span>
<span class="c"></span>
<span class="k">var</span> <span class="nx">attach</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">fromLoader</span><span class="o">)</span> <span class="o">{</span>
<span class="c">// Y.log(&#39;ATTACH &#39; + arguments[0]);</span>
<span class="c"></span>
<span class="k">if</span> <span class="o">(!</span><span class="nx">fromLoader</span><span class="o">)</span> <span class="o">{</span>
<span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">,</span> <span class="nx">l</span><span class="o">=</span><span class="nx">r</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">l</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
<span class="k">var</span> <span class="nx">m</span> <span class="o">=</span> <span class="nx">mods</span><span class="o">[</span><span class="nx">r</span><span class="o">[</span><span class="nx">i</span><span class="o">]];</span>
<span class="k">if</span> <span class="o">(</span><span class="nx">m</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;attaching &#39;</span> <span class="o">+</span> <span class="nx">r</span><span class="o">[</span><span class="nx">i</span><span class="o">],</span> <span class="s1">&#39;info&#39;</span><span class="o">,</span> <span class="s1">&#39;YUI&#39;</span><span class="o">);</span>
<span class="nx">m</span><span class="o">.</span><span class="nx">fn</span><span class="o">(</span><span class="nx">Y</span><span class="o">);</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="k">if</span> <span class="o">(</span><span class="nx">callback</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">callback</span><span class="o">(</span><span class="nx">Y</span><span class="o">);</span>
<span class="o">}</span>
<span class="k">if</span> <span class="o">(</span><span class="nx">Y</span><span class="o">.</span><span class="nx">fire</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">Y</span><span class="o">.</span><span class="nx">fire</span><span class="o">(</span><span class="s1">&#39;yui:load&#39;</span><span class="o">,</span> <span class="nx">Y</span><span class="o">);</span>
<span class="o">}</span>
<span class="o">};</span>
<span class="k">if</span> <span class="o">(!</span><span class="nx">sorted</span> <span class="o">&amp;&amp;</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Loader</span> <span class="o">&amp;&amp;</span> <span class="nx">missing</span><span class="o">.</span><span class="nx">length</span><span class="o">)</span> <span class="o">{</span>
<span class="c">// dynamic load</span>
<span class="c"></span> <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;trying to get the missing modules &#39;</span> <span class="o">+</span> <span class="nx">missing</span><span class="o">);</span>
<span class="nx">loader</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Loader</span><span class="o">(</span><span class="nx">Y</span><span class="o">.</span><span class="nx">config</span><span class="o">);</span>
<span class="nx">loader</span><span class="o">.</span><span class="nx">require</span><span class="o">(</span><span class="nx">missing</span><span class="o">);</span>
<span class="nx">loader</span><span class="o">.</span><span class="nx">insert</span><span class="o">();</span>
<span class="c">// loader calls use to automatically attach when finished</span>
<span class="c"></span> <span class="c">// but we still need to execute the callback.</span>
<span class="c"></span> <span class="nx">loader</span><span class="o">.</span><span class="nx">subscribe</span><span class="o">(</span><span class="s1">&#39;success&#39;</span><span class="o">,</span> <span class="nx">attach</span><span class="o">,</span> <span class="nx">loader</span><span class="o">,</span> <span class="s1">&#39;loader&#39;</span><span class="o">);</span>
<span class="c">// loader.subscribe(&#39;failure&#39;, function() {</span>
<span class="c"></span> <span class="c">// Y.log(&#39;asdf&#39;);</span>
<span class="c"></span> <span class="c">// });</span>
<span class="c"></span> <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
<span class="nx">attach</span><span class="o">();</span>
<span class="o">}</span>
<span class="k">return</span> <span class="nx">Y</span><span class="o">;</span> <span class="c">// chain support var yui = YUI().use(&#39;dragdrop&#39;);</span>
<span class="c"></span> <span class="o">},</span>
<span class="c">/**</span>
<span class="c"> * Returns the namespace specified and creates it if it doesn&#39;t exist</span>
<span class="c"> * &lt;pre&gt;</span>
<span class="c"> * YUI.namespace(&quot;property.package&quot;);</span>
<span class="c"> * YUI.namespace(&quot;YUI.property.package&quot;);</span>
<span class="c"> * &lt;/pre&gt;</span>
<span class="c"> * Either of the above would create YUI.property, then</span>
<span class="c"> * YUI.property.package</span>
<span class="c"> *</span>
<span class="c"> * Be careful when naming packages. Reserved words may work in some browsers</span>
<span class="c"> * and not others. For instance, the following will fail in Safari:</span>
<span class="c"> * &lt;pre&gt;</span>
<span class="c"> * YUI.namespace(&quot;really.long.nested.namespace&quot;);</span>
<span class="c"> * &lt;/pre&gt;</span>
<span class="c"> * This fails because &quot;long&quot; is a future reserved word in ECMAScript</span>
<span class="c"> *</span>
<span class="c"> * @method namespace</span>
<span class="c"> * @static</span>
<span class="c"> * @param {String*} arguments 1-n namespaces to create </span>
<span class="c"> * @return {Object} A reference to the last namespace object created</span>
<span class="c"> */</span>
<span class="nx">namespace</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
<span class="k">var</span> <span class="nx">a</span><span class="o">=</span><span class="nx">arguments</span><span class="o">,</span> <span class="nx">o</span><span class="o">=</span><span class="kc">null</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">j</span><span class="o">,</span> <span class="nx">d</span><span class="o">;</span>
<span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">a</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">d</span> <span class="o">=</span> <span class="nx">a</span><span class="o">[</span><span class="nx">i</span><span class="o">].</span><span class="nx">split</span><span class="o">(</span><span class="s2">&quot;.&quot;</span><span class="o">);</span>
<span class="nx">o</span> <span class="o">=</span> <span class="k">this</span><span class="o">;</span>
<span class="k">for</span> <span class="o">(</span><span class="nx">j</span><span class="o">=(</span><span class="nx">d</span><span class="o">[</span><span class="m">0</span><span class="o">]</span> <span class="o">==</span> <span class="s2">&quot;YUI&quot;</span><span class="o">)</span> <span class="o">?</span> <span class="m">1</span> <span class="o">:</span> <span class="m">0</span><span class="o">;</span> <span class="nx">j</span><span class="o">&lt;</span><span class="nx">d</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">j</span><span class="o">=</span><span class="nx">j</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">o</span><span class="o">[</span><span class="nx">d</span><span class="o">[</span><span class="nx">j</span><span class="o">]]</span> <span class="o">=</span> <span class="nx">o</span><span class="o">[</span><span class="nx">d</span><span class="o">[</span><span class="nx">j</span><span class="o">]]</span> <span class="o">||</span> <span class="o">{};</span>
<span class="nx">o</span> <span class="o">=</span> <span class="nx">o</span><span class="o">[</span><span class="nx">d</span><span class="o">[</span><span class="nx">j</span><span class="o">]];</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="k">return</span> <span class="nx">o</span><span class="o">;</span>
<span class="o">},</span>
<span class="c">// this is replaced if the log module is included</span>
<span class="c"></span> <span class="nx">log</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
<span class="o">},</span>
<span class="c">/**</span>
<span class="c"> * Report an error. The reporting mechanism is controled by</span>
<span class="c"> * the &#39;throwFail&#39; configuration attribute. If throwFail is</span>
<span class="c"> * not specified, the message is written to the logger, otherwise</span>
<span class="c"> * a JS error is thrown</span>
<span class="c"> * @method fail</span>
<span class="c"> * @param msg {string} the failure message</span>
<span class="c"> * @param e {Error} Optional JS error that was caught. If supplied</span>
<span class="c"> * and throwFail is specified, this error will be re-thrown.</span>
<span class="c"> * @return {YUI} this YUI instance</span>
<span class="c"> */</span>
<span class="nx">fail</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">msg</span><span class="o">,</span> <span class="nx">e</span><span class="o">)</span> <span class="o">{</span>
<span class="k">this</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="nx">msg</span><span class="o">,</span> <span class="s2">&quot;error&quot;</span><span class="o">);</span>
<span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">config</span><span class="o">.</span><span class="nx">throwFail</span><span class="o">)</span> <span class="o">{</span>
<span class="k">throw</span> <span class="nx">e</span> <span class="o">||</span> <span class="k">new</span> <span class="nb">Error</span><span class="o">(</span><span class="nx">msg</span><span class="o">);</span>
<span class="o">}</span>
<span class="k">return</span> <span class="k">this</span><span class="o">;</span>
<span class="o">},</span>
<span class="c">/**</span>
<span class="c"> * Generate an id that is unique among all YUI instances</span>
<span class="c"> * @method guid</span>
<span class="c"> * @param pre {string} optional guid prefix</span>
<span class="c"> * @return {string} the guid</span>
<span class="c"> */</span>
<span class="nx">guid</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">pre</span><span class="o">)</span> <span class="o">{</span>
<span class="k">var</span> <span class="nx">e</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">Env</span><span class="o">,</span> <span class="nx">p</span> <span class="o">=</span> <span class="o">(</span><span class="nx">pre</span><span class="o">)</span> <span class="o">||</span> <span class="nx">e</span><span class="o">.</span><span class="nx">_pre</span><span class="o">;</span>
<span class="k">return</span> <span class="nx">p</span> <span class="o">+</span><span class="s1">&#39;-&#39;</span> <span class="o">+</span> <span class="nx">e</span><span class="o">.</span><span class="nx">_yidx</span> <span class="o">+</span> <span class="s1">&#39;-&#39;</span> <span class="o">+</span> <span class="nx">e</span><span class="o">.</span><span class="nx">_uidx</span><span class="o">++;</span>
<span class="o">},</span>
<span class="c">/**</span>
<span class="c"> * Stamps an object with a guid. If the object already</span>
<span class="c"> * has one, a new one is not created</span>
<span class="c"> * @method stamp</span>
<span class="c"> * @param o The object to stamp</span>
<span class="c"> * @return {string} The object&#39;s guid</span>
<span class="c"> */</span>
<span class="nx">stamp</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>
<span class="k">if</span> <span class="o">(!</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>
<span class="k">return</span> <span class="nx">o</span><span class="o">;</span>
<span class="o">}</span>
<span class="k">var</span> <span class="nx">uid</span> <span class="o">=</span> <span class="o">(</span><span class="k">typeof</span> <span class="nx">o</span> <span class="o">===</span> <span class="s1">&#39;string&#39;</span><span class="o">)</span> <span class="o">?</span> <span class="nx">o</span> <span class="o">:</span> <span class="nx">o</span><span class="o">.</span><span class="nx">_yuid</span><span class="o">;</span>
<span class="k">if</span> <span class="o">(!</span><span class="nx">uid</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">uid</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">guid</span><span class="o">();</span>
<span class="nx">o</span><span class="o">.</span><span class="nx">_yuid</span> <span class="o">=</span> <span class="nx">uid</span><span class="o">;</span>
<span class="o">}</span>
<span class="k">return</span> <span class="nx">uid</span><span class="o">;</span>
<span class="o">}</span>
<span class="o">};</span>
<span class="c">// Give the YUI global the same properties as an instance.</span>
<span class="c">// This makes it so that the YUI global can be used like the YAHOO</span>
<span class="c">// global was used prior to 3.x. More importantly, the YUI global</span>
<span class="c">// provides global metadata, so env needs to be configured.</span>
<span class="c">// @TODO review</span>
<span class="c"></span>
<span class="k">var</span> <span class="nx">Y</span> <span class="o">=</span> <span class="nx">YUI</span><span class="o">,</span> <span class="nx">p</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">prototype</span><span class="o">,</span> <span class="nx">i</span><span class="o">;</span>
<span class="c">// inheritance utilities are not available yet</span>
<span class="c"></span> <span class="k">for</span> <span class="o">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">p</span><span class="o">)</span> <span class="o">{</span>
<span class="k">if</span> <span class="o">(</span><span class="kc">true</span><span class="o">)</span> <span class="o">{</span> <span class="c">// hasOwnProperty not available yet and not needed</span>
<span class="c"></span> <span class="nx">Y</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="o">=</span> <span class="nx">p</span><span class="o">[</span><span class="nx">i</span><span class="o">];</span>
<span class="o">}</span>
<span class="o">}</span>
<span class="c">// set up the environment</span>
<span class="c"></span> <span class="nx">Y</span><span class="o">.</span><span class="nx">_init</span><span class="o">();</span>
<span class="o">})();</span>
</pre></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_attribute.html">attribute</a></li>
<li class=""><a href="module_base.html">base</a></li>
<li class=""><a href="module_dd-plugin.html">dd-plugin</a></li>
<li class=""><a href="module_event.html">event</a></li>
<li class=""><a href="module_io.html">io</a></li>
<li class=""><a href="module_JSON.html">JSON</a></li>
<li class="selected"><a href="module_yui.html">yui</a></li>
</ul>
</div>
<div class="module">
<h4>Classes</h4>
<ul class="content">
<li class=""><a href="Array.html">Array</a></li>
<li class=""><a href="Lang.html">Lang</a></li>
<li class=""><a href="Object.html">Object</a></li>
<li class=""><a href="UA.html">UA</a></li>
<li class=""><a href="YUI.html">YUI</a></li>
</ul>
</div>
<div class="module">
<h4>Files</h4>
<ul class="content">
<li class=""><a href="yui-array.js.html">yui-array.js</a></li>
<li class=""><a href="yui-core.js.html">yui-core.js</a></li>
<li class=""><a href="yui-dump.js.html">yui-dump.js</a></li>
<li class=""><a href="yui-init.js.html">yui-init.js</a></li>
<li class=""><a href="yui-lang.js.html">yui-lang.js</a></li>
<li class=""><a href="yui-later.js.html">yui-later.js</a></li>
<li class=""><a href="yui-log.js.html">yui-log.js</a></li>
<li class=""><a href="yui-object.js.html">yui-object.js</a></li>
<li class=""><a href="yui-ua.js.html">yui-ua.js</a></li>
<li class="selected"><a href="yui.js.html">yui.js</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright &copy; 2008 Yahoo! Inc. All rights reserved.
</div>
</div>
</body>
</html>