yui-init.js.html revision 4fcbec6145d16637205990699912fb90f6a3807c
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>API: yui yui-init.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-init.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" /> <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>
<div id="srcout">
<style>
#doc3 #classopts { display:none; }
</style>
<div class="highlight" ><pre><span class="c">/*</span>
<span class="c"> * YUI initializer</span>
<span class="c"> * @module yui</span>
<span class="c"> * @submodule init</span>
<span class="c"> */</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">min</span> <span class="o">=</span> <span class="o">[</span><span class="s1">&#39;yui-base&#39;</span><span class="o">,</span> <span class="s1">&#39;log&#39;</span><span class="o">,</span> <span class="s1">&#39;lang&#39;</span><span class="o">,</span> <span class="s1">&#39;array&#39;</span><span class="o">,</span> <span class="s1">&#39;core&#39;</span><span class="o">],</span> <span class="nx">core</span><span class="o">,</span>
<span class="nx">M</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">Y</span><span class="o">)</span> <span class="o">{</span>
<span class="k">var</span> <span class="nx">C</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="c">// apply the minimal required functionality</span>
<span class="c"></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">min</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="nx">Y</span><span class="o">.</span><span class="nx">id</span> <span class="o">+</span> <span class="s1">&#39; initialized&#39;</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="k">if</span> <span class="o">(</span><span class="nx">C</span><span class="o">.</span><span class="nx">core</span><span class="o">)</span> <span class="o">{</span>
<span class="nx">core</span> <span class="o">=</span> <span class="nx">C</span><span class="o">.</span><span class="nx">core</span><span class="o">;</span>
<span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
<span class="nx">core</span> <span class="o">=</span> <span class="o">[</span><span class="s2">&quot;object&quot;</span><span class="o">,</span> <span class="s2">&quot;ua&quot;</span><span class="o">,</span> <span class="s2">&quot;later&quot;</span><span class="o">];</span>
<span class="nx">core</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span>
<span class="s2">&quot;get&quot;</span><span class="o">,</span>
<span class="s2">&quot;loader&quot;</span><span class="o">);</span>
<span class="o">}</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">core</span><span class="o">);</span>
<span class="o">};</span>
<span class="nx">YUI</span><span class="o">.</span><span class="nx">add</span><span class="o">(</span><span class="s2">&quot;yui&quot;</span><span class="o">,</span> <span class="nx">M</span><span class="o">,</span> <span class="s2">&quot;@VERSION@&quot;</span><span class="o">);</span>
<span class="c">// {</span>
<span class="c"></span> <span class="c">// the following will be bound automatically when this code is loaded</span>
<span class="c"></span> <span class="c">// use: core</span>
<span class="c"></span> <span class="c">// });</span>
<span class="c"></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_anim.html">anim</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.html">dd</a></li>
<li class=""><a href="module_dd-plugin.html">dd-plugin</a></li>
<li class=""><a href="module_dump.html">dump</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_node.html">node</a></li>
<li class=""><a href="module_oop.html">oop</a></li>
<li class=""><a href="module_queue.html">queue</a></li>
<li class=""><a href="module_substitute.html">substitute</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="Get.html">Get</a></li>
<li class=""><a href="Lang.html">Lang</a></li>
<li class=""><a href="Loader.html">Loader</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="get.js.html">get.js</a></li>
<li class=""><a href="loader.js.html">loader.js</a></li>
<li class=""><a href="yui-array.js.html">yui-array.js</a></li>
<li class=""><a href="yui-base.js.html">yui-base.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="selected"><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=""><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>