yui-init.js.html revision 4faa10dce2a190bcfe47119e70fc48011fde9023
<html>
<head>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<h3>yui <span class="subtitle">3.00PR1</span></h3>
<p>
> 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" /> 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">min</span> <span class="o">=</span> <span class="o">[</span><span class="s1">'log'</span><span class="o">,</span> <span class="s1">'lang'</span><span class="o">,</span> <span class="s1">'array'</span><span class="o">,</span> <span class="s1">'core'</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">' initialized'</span><span class="o">,</span> <span class="s1">'info'</span><span class="o">,</span> <span class="s1">'YUI'</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">"object"</span><span class="o">,</span> <span class="s2">"ua"</span><span class="o">,</span> <span class="s2">"later"</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">"get"</span><span class="o">,</span>
<span class="s2">"loader"</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">"yui"</span><span class="o">,</span> <span class="nx">M</span><span class="o">,</span> <span class="s2">"@VERSION@"</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">
</ul>
</div>
<div class="module">
<h4>Classes</h4>
<ul class="content">
</ul>
</div>
<div class="module">
<h4>Files</h4>
<ul class="content">
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright © 2008 Yahoo! Inc. All rights reserved.
</div>
</div>
</body>
</html>