Simple status box for the sidebar.
[elgg_plugins.git] / yui / docs / YAHOO.html
blob916100ab161c93ed4e21561cf309bfe756b221cf
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <title>API: yahoo YAHOO (YUI Library)</title>
5 <link rel="stylesheet" type="text/css" href="assets/api.css">
6 </head>
8 <body id="yahoo-com">
9 <div id="doc3" class="yui-t2">
11 <div id="hd">
12 <h1>Yahoo! UI Library</h1>
13 <h3>YAHOO Global&nbsp; <span class="subtitle">2.2.0</span></h3>
14 <p>
15 <a href="./index.html">Yahoo! UI Library</a>
16 &gt; <a href="./module_yahoo.html">yahoo</a>
17 &gt; YAHOO
19 </p>
20 </div>
22 <div id="bd">
23 <div id="yui-main">
24 <div class="yui-b">
27 <h2>
30 <code>static</code>
32 Class <b>YAHOO</b>
33 <span class="extends">
34 </span>
36 <span class="extends">
37 </span>
39 </code>
40 </h2>
41 <!-- class tree goes here -->
46 <div class="summary description">
47 The YAHOO global namespace object. If YAHOO is already defined, the
48 existing YAHOO object will not be overwritten so that defined
49 namespaces are preserved.
50 </div>
55 <div class="section method details">
56 <h3><a name="methodDetails">Methods</a></h3>
57 <div class="content">
58 <h4>
59 <a name="augment">augment</a></h4>
60 <div class="detail">
61 <code>
63 static
65 void
66 <strong>augment</strong>
78 arguments
82 </code>
84 <div class="description">
85 An alias for <a href="YAHOO.lang.html#augment">YAHOO.lang.augment</a>
86 </div>
88 <div class="description">
90 <dl>
91 <dt>Parameters:</dt>
92 <dd>
93 <code>r &lt;Function&gt;</code>
94 the object to receive the augmentation
95 </dd>
96 <dd>
97 <code>s &lt;Function&gt;</code>
98 the object that supplies the properties to augment
99 </dd>
100 <dd>
101 <code>arguments &lt;String*&gt;</code>
102 zero or more properties methods to augment the
103 receiver with. If none specified, everything
104 in the supplier will be used unless it would
105 overwrite an existing property in the receiver
106 </dd>
107 </dl>
109 <dl>
110 <dt>Returns:
111 <code>
112 void
113 </code></dt>
114 <dd></dd>
115 </dl>
117 </div>
119 </div>
120 <hr />
121 <h4>
122 <a name="extend">extend</a></h4>
123 <div class="detail">
124 <code>
126 static
128 void
129 <strong>extend</strong>
133 subc
137 superc
141 overrides
145 </code>
147 <div class="description">
148 An alias for <a href="YAHOO.lang.html#extend">YAHOO.lang.extend</a>
149 </div>
151 <div class="description">
153 <dl>
154 <dt>Parameters:</dt>
155 <dd>
156 <code>subc &lt;Function&gt;</code>
157 the object to modify
158 </dd>
159 <dd>
160 <code>superc &lt;Function&gt;</code>
161 the object to inherit
162 </dd>
163 <dd>
164 <code>overrides &lt;Object&gt;</code>
165 additional properties/methods to add to the
166 subclass prototype. These will override the
167 matching items obtained from the superclass
168 if present.
169 </dd>
170 </dl>
172 <dl>
173 <dt>Returns:
174 <code>
175 void
176 </code></dt>
177 <dd></dd>
178 </dl>
180 </div>
182 </div>
183 <hr />
184 <h4>
185 <a name="init">init</a></h4>
186 <div class="detail">
187 <code>
189 static
191 void
192 <strong>init</strong>
195 </code>
197 <div class="description">
198 Initializes the global by creating the default namespaces and applying
199 any new configuration information that is detected.
200 </div>
202 <div class="description">
205 <dl>
206 <dt>Returns:
207 <code>
208 void
209 </code></dt>
210 <dd></dd>
211 </dl>
213 </div>
215 </div>
216 <hr />
217 <h4>
218 <a name="log">log</a></h4>
219 <div class="detail">
220 <code>
222 static
224 Boolean
225 <strong>log</strong>
241 </code>
243 <div class="description">
244 Uses YAHOO.widget.Logger to output a log message, if the widget is
245 available.
246 </div>
248 <div class="description">
250 <dl>
251 <dt>Parameters:</dt>
252 <dd>
253 <code>msg &lt;String&gt;</code>
254 The message to log.
255 </dd>
256 <dd>
257 <code>cat &lt;String&gt;</code>
258 The log category for the message. Default
259 categories are "info", "warn", "error", time".
260 Custom categories can be used as well. (opt)
261 </dd>
262 <dd>
263 <code>src &lt;String&gt;</code>
264 The source of the the message (opt)
265 </dd>
266 </dl>
268 <dl>
269 <dt>Returns:
270 <code>
271 Boolean
272 </code></dt>
273 <dd>True if the log operation was successful.</dd>
274 </dl>
276 </div>
278 </div>
279 <hr />
280 <h4>
281 <a name="namespace">namespace</a></h4>
282 <div class="detail">
283 <code>
285 static
287 Object
288 <strong>namespace</strong>
292 arguments
296 </code>
298 <div class="description">
299 Returns the namespace specified and creates it if it doesn't exist
300 <pre>
301 YAHOO.namespace("property.package");
302 YAHOO.namespace("YAHOO.property.package");
303 </pre>
304 Either of the above would create YAHOO.property, then
305 YAHOO.property.package
306 Be careful when naming packages. Reserved words may work in some browsers
307 and not others. For instance, the following will fail in Safari:
308 <pre>
309 YAHOO.namespace("really.long.nested.namespace");
310 </pre>
311 This fails because "long" is a future reserved word in ECMAScript
312 </div>
314 <div class="description">
316 <dl>
317 <dt>Parameters:</dt>
318 <dd>
319 <code>arguments &lt;String*&gt;</code>
320 1-n namespaces to create
321 </dd>
322 </dl>
324 <dl>
325 <dt>Returns:
326 <code>
327 Object
328 </code></dt>
329 <dd>A reference to the last namespace object created</dd>
330 </dl>
332 </div>
334 </div>
335 <hr />
336 <h4>
337 <a name="register">register</a></h4>
338 <div class="detail">
339 <code>
341 static
343 void
344 <strong>register</strong>
348 name
352 mainClass
356 data
360 </code>
362 <div class="description">
363 Registers a module with the YAHOO object
364 </div>
366 <div class="description">
368 <dl>
369 <dt>Parameters:</dt>
370 <dd>
371 <code>name &lt;String&gt;</code>
372 the name of the module (event, slider, etc)
373 </dd>
374 <dd>
375 <code>mainClass &lt;Function&gt;</code>
376 a reference to class in the module. This
377 class will be tagged with the version info
378 so that it will be possible to identify the
379 version that is in use when multiple versions
380 have loaded
381 </dd>
382 <dd>
383 <code>data &lt;Object&gt;</code>
384 metadata object for the module. Currently it
385 is expected to contain a "version" property
386 and a "build" property at minimum.
387 </dd>
388 </dl>
390 <dl>
391 <dt>Returns:
392 <code>
393 void
394 </code></dt>
395 <dd></dd>
396 </dl>
398 </div>
400 </div>
401 <hr />
402 </div>
403 </div>
411 </div>
412 </div>
413 <div class="yui-b">
414 <div class="nav">
416 <div class="module">
417 <h4>Modules</h4>
418 <ul class="content">
420 <li class=""><a href="module_animation.html">animation</a></li>
422 <li class=""><a href="module_autocomplete.html">autocomplete</a></li>
424 <li class=""><a href="module_button.html">button</a></li>
426 <li class=""><a href="module_calendar.html">calendar</a></li>
428 <li class=""><a href="module_connection.html">connection</a></li>
430 <li class=""><a href="module_container.html">container</a></li>
432 <li class=""><a href="module_datasource.html">datasource</a></li>
434 <li class=""><a href="module_datatable.html">datatable</a></li>
436 <li class=""><a href="module_dom.html">dom</a></li>
438 <li class=""><a href="module_dragdrop.html">dragdrop</a></li>
440 <li class=""><a href="module_element.html">element</a></li>
442 <li class=""><a href="module_event.html">event</a></li>
444 <li class=""><a href="module_history.html">history</a></li>
446 <li class=""><a href="module_logger.html">logger</a></li>
448 <li class=""><a href="module_menu.html">menu</a></li>
450 <li class=""><a href="module_slider.html">slider</a></li>
452 <li class=""><a href="module_tabview.html">tabview</a></li>
454 <li class=""><a href="module_treeview.html">treeview</a></li>
456 <li class="selected"><a href="module_yahoo.html">yahoo</a></li>
457 </ul>
458 </div>
460 <div class="module">
461 <h4>Classes</h4>
462 <ul class="content">
463 <li class="selected"><a href="YAHOO.html">YAHOO</a></li>
464 <li class=""><a href="YAHOO.env.html">YAHOO.env</a></li>
465 <li class=""><a href="YAHOO.lang.html">YAHOO.lang</a></li>
466 <li class=""><a href="YAHOO_config.html">YAHOO_config</a></li>
467 </ul>
468 </div>
470 <div class="module">
471 <h4>Files</h4>
472 <ul class="content">
473 <li class=""><a href="YAHOO.js.html">YAHOO.js</a></li>
474 </ul>
475 </div>
478 <div class="module">
479 <h4>Methods</h4>
480 <ul class="content">
481 <li><!--<code>void</code>-->
482 <a href="#augment">augment</a>
483 </li>
484 <li><!--<code>void</code>-->
485 <a href="#extend">extend</a>
486 </li>
487 <li><!--<code>void</code>-->
488 <a href="#init">init</a>
489 </li>
490 <li><!--<code>Boolean</code>-->
491 <a href="#log">log</a>
492 </li>
493 <li><!--<code>Object</code>-->
494 <a href="#namespace">namespace</a>
495 </li>
496 <li><!--<code>void</code>-->
497 <a href="#register">register</a>
498 </li>
499 </ul>
500 </div>
504 </div>
505 </div>
506 </div>
507 <div id="ft">
508 <hr />
509 Copyright &copy; 2007 Yahoo! Inc. All rights reserved.
510 </div>
511 </div>
512 </body>
513 </html>