Simple status box for the sidebar.
[elgg_plugins.git] / yui / docs / YAHOO.lang.html
blob218ffc5109b5fa3311810362527ad119f59021ed
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.lang (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.lang
19 </p>
20 </div>
22 <div id="bd">
23 <div id="yui-main">
24 <div class="yui-b">
27 <h2>
32 Class <b>YAHOO.lang</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 Provides the language utilites and extensions used by the library
48 </div>
53 <div class="section method details">
54 <h3><a name="methodDetails">Methods</a></h3>
55 <div class="content">
56 <h4>
57 <a name="augment">augment</a></h4>
58 <div class="detail">
59 <code>
61 static
63 void
64 <strong>augment</strong>
76 arguments
80 </code>
82 <div class="description">
83 Applies all prototype properties in the supplier to the receiver if the
84 receiver does not have these properties yet. Optionally, one or more
85 methods/properties can be specified (as additional parameters). This
86 option will overwrite the property if receiver has it already.
87 </div>
89 <div class="description">
91 <dl>
92 <dt>Parameters:</dt>
93 <dd>
94 <code>r &lt;Function&gt;</code>
95 the object to receive the augmentation
96 </dd>
97 <dd>
98 <code>s &lt;Function&gt;</code>
99 the object that supplies the properties to augment
100 </dd>
101 <dd>
102 <code>arguments &lt;String*&gt;</code>
103 zero or more properties methods to augment the
104 receiver with. If none specified, everything
105 in the supplier will be used unless it would
106 overwrite an existing property in the receiver
107 </dd>
108 </dl>
110 <dl>
111 <dt>Returns:
112 <code>
113 void
114 </code></dt>
115 <dd></dd>
116 </dl>
118 </div>
120 </div>
121 <hr />
122 <h4>
123 <a name="extend">extend</a></h4>
124 <div class="detail">
125 <code>
127 static
129 void
130 <strong>extend</strong>
134 subc
138 superc
142 overrides
146 </code>
148 <div class="description">
149 Utility to set up the prototype, constructor and superclass properties to
150 support an inheritance strategy that can chain constructors and methods.
151 </div>
153 <div class="description">
155 <dl>
156 <dt>Parameters:</dt>
157 <dd>
158 <code>subc &lt;Function&gt;</code>
159 the object to modify
160 </dd>
161 <dd>
162 <code>superc &lt;Function&gt;</code>
163 the object to inherit
164 </dd>
165 <dd>
166 <code>overrides &lt;Object&gt;</code>
167 additional properties/methods to add to the
168 subclass prototype. These will override the
169 matching items obtained from the superclass
170 if present.
171 </dd>
172 </dl>
174 <dl>
175 <dt>Returns:
176 <code>
177 void
178 </code></dt>
179 <dd></dd>
180 </dl>
182 </div>
184 </div>
185 <hr />
186 <h4>
187 <a name="hasOwnProperty">hasOwnProperty</a></h4>
188 <div class="detail">
189 <code>
193 void
194 <strong>hasOwnProperty</strong>
202 </code>
204 <div class="description">
205 Determines whether or not the property was added
206 to the object instance. Returns false if the property is not present
207 in the object, or was inherited from the prototype.
208 This abstraction is provided to enable hasOwnProperty for Safari 1.3.x.
209 There is a discrepancy between YAHOO.lang.hasOwnProperty and
210 Object.prototype.hasOwnProperty when the property is a primitive added to
211 both the instance AND prototype with the same value:
212 <pre>
213 var A = function() {};
214 A.prototype.foo = 'foo';
215 var a = new A();
216 a.foo = 'foo';
217 alert(a.hasOwnProperty('foo')); // true
218 alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using fallback
219 </pre>
220 </div>
222 <div class="description">
224 <dl>
225 <dt>Parameters:</dt>
226 <dd>
227 <code>obj &lt;any&gt;</code>
228 The object being testing
229 </dd>
230 </dl>
232 <dl>
233 <dt>Returns:
234 <code>
235 void
236 </code></dt>
237 <dd>Boolean</dd>
238 </dl>
240 </div>
242 </div>
243 <hr />
244 <h4>
245 <a name="isArray">isArray</a></h4>
246 <div class="detail">
247 <code>
251 void
252 <strong>isArray</strong>
260 </code>
262 <div class="description">
263 Determines whether or not the provided object is an array
264 </div>
266 <div class="description">
268 <dl>
269 <dt>Parameters:</dt>
270 <dd>
271 <code>obj &lt;any&gt;</code>
272 The object being testing
273 </dd>
274 </dl>
276 <dl>
277 <dt>Returns:
278 <code>
279 void
280 </code></dt>
281 <dd>Boolean</dd>
282 </dl>
284 </div>
286 </div>
287 <hr />
288 <h4>
289 <a name="isBoolean">isBoolean</a></h4>
290 <div class="detail">
291 <code>
295 void
296 <strong>isBoolean</strong>
304 </code>
306 <div class="description">
307 Determines whether or not the provided object is a boolean
308 </div>
310 <div class="description">
312 <dl>
313 <dt>Parameters:</dt>
314 <dd>
315 <code>obj &lt;any&gt;</code>
316 The object being testing
317 </dd>
318 </dl>
320 <dl>
321 <dt>Returns:
322 <code>
323 void
324 </code></dt>
325 <dd>Boolean</dd>
326 </dl>
328 </div>
330 </div>
331 <hr />
332 <h4>
333 <a name="isFunction">isFunction</a></h4>
334 <div class="detail">
335 <code>
339 void
340 <strong>isFunction</strong>
348 </code>
350 <div class="description">
351 Determines whether or not the provided object is a function
352 </div>
354 <div class="description">
356 <dl>
357 <dt>Parameters:</dt>
358 <dd>
359 <code>obj &lt;any&gt;</code>
360 The object being testing
361 </dd>
362 </dl>
364 <dl>
365 <dt>Returns:
366 <code>
367 void
368 </code></dt>
369 <dd>Boolean</dd>
370 </dl>
372 </div>
374 </div>
375 <hr />
376 <h4>
377 <a name="isNull">isNull</a></h4>
378 <div class="detail">
379 <code>
383 void
384 <strong>isNull</strong>
392 </code>
394 <div class="description">
395 Determines whether or not the provided object is null
396 </div>
398 <div class="description">
400 <dl>
401 <dt>Parameters:</dt>
402 <dd>
403 <code>obj &lt;any&gt;</code>
404 The object being testing
405 </dd>
406 </dl>
408 <dl>
409 <dt>Returns:
410 <code>
411 void
412 </code></dt>
413 <dd>Boolean</dd>
414 </dl>
416 </div>
418 </div>
419 <hr />
420 <h4>
421 <a name="isNumber">isNumber</a></h4>
422 <div class="detail">
423 <code>
427 void
428 <strong>isNumber</strong>
436 </code>
438 <div class="description">
439 Determines whether or not the provided object is a legal number
440 </div>
442 <div class="description">
444 <dl>
445 <dt>Parameters:</dt>
446 <dd>
447 <code>obj &lt;any&gt;</code>
448 The object being testing
449 </dd>
450 </dl>
452 <dl>
453 <dt>Returns:
454 <code>
455 void
456 </code></dt>
457 <dd>Boolean</dd>
458 </dl>
460 </div>
462 </div>
463 <hr />
464 <h4>
465 <a name="isObject">isObject</a></h4>
466 <div class="detail">
467 <code>
471 void
472 <strong>isObject</strong>
480 </code>
482 <div class="description">
483 Determines whether or not the provided object is of type object
484 or function
485 </div>
487 <div class="description">
489 <dl>
490 <dt>Parameters:</dt>
491 <dd>
492 <code>obj &lt;any&gt;</code>
493 The object being testing
494 </dd>
495 </dl>
497 <dl>
498 <dt>Returns:
499 <code>
500 void
501 </code></dt>
502 <dd>Boolean</dd>
503 </dl>
505 </div>
507 </div>
508 <hr />
509 <h4>
510 <a name="isString">isString</a></h4>
511 <div class="detail">
512 <code>
516 void
517 <strong>isString</strong>
525 </code>
527 <div class="description">
528 Determines whether or not the provided object is a string
529 </div>
531 <div class="description">
533 <dl>
534 <dt>Parameters:</dt>
535 <dd>
536 <code>obj &lt;any&gt;</code>
537 The object being testing
538 </dd>
539 </dl>
541 <dl>
542 <dt>Returns:
543 <code>
544 void
545 </code></dt>
546 <dd>Boolean</dd>
547 </dl>
549 </div>
551 </div>
552 <hr />
553 <h4>
554 <a name="isUndefined">isUndefined</a></h4>
555 <div class="detail">
556 <code>
560 void
561 <strong>isUndefined</strong>
569 </code>
571 <div class="description">
572 Determines whether or not the provided object is undefined
573 </div>
575 <div class="description">
577 <dl>
578 <dt>Parameters:</dt>
579 <dd>
580 <code>obj &lt;any&gt;</code>
581 The object being testing
582 </dd>
583 </dl>
585 <dl>
586 <dt>Returns:
587 <code>
588 void
589 </code></dt>
590 <dd>Boolean</dd>
591 </dl>
593 </div>
595 </div>
596 <hr />
597 </div>
598 </div>
606 </div>
607 </div>
608 <div class="yui-b">
609 <div class="nav">
611 <div class="module">
612 <h4>Modules</h4>
613 <ul class="content">
615 <li class=""><a href="module_animation.html">animation</a></li>
617 <li class=""><a href="module_autocomplete.html">autocomplete</a></li>
619 <li class=""><a href="module_button.html">button</a></li>
621 <li class=""><a href="module_calendar.html">calendar</a></li>
623 <li class=""><a href="module_connection.html">connection</a></li>
625 <li class=""><a href="module_container.html">container</a></li>
627 <li class=""><a href="module_datasource.html">datasource</a></li>
629 <li class=""><a href="module_datatable.html">datatable</a></li>
631 <li class=""><a href="module_dom.html">dom</a></li>
633 <li class=""><a href="module_dragdrop.html">dragdrop</a></li>
635 <li class=""><a href="module_element.html">element</a></li>
637 <li class=""><a href="module_event.html">event</a></li>
639 <li class=""><a href="module_history.html">history</a></li>
641 <li class=""><a href="module_logger.html">logger</a></li>
643 <li class=""><a href="module_menu.html">menu</a></li>
645 <li class=""><a href="module_slider.html">slider</a></li>
647 <li class=""><a href="module_tabview.html">tabview</a></li>
649 <li class=""><a href="module_treeview.html">treeview</a></li>
651 <li class="selected"><a href="module_yahoo.html">yahoo</a></li>
652 </ul>
653 </div>
655 <div class="module">
656 <h4>Classes</h4>
657 <ul class="content">
658 <li class=""><a href="YAHOO.html">YAHOO</a></li>
659 <li class=""><a href="YAHOO.env.html">YAHOO.env</a></li>
660 <li class="selected"><a href="YAHOO.lang.html">YAHOO.lang</a></li>
661 <li class=""><a href="YAHOO_config.html">YAHOO_config</a></li>
662 </ul>
663 </div>
665 <div class="module">
666 <h4>Files</h4>
667 <ul class="content">
668 <li class=""><a href="YAHOO.js.html">YAHOO.js</a></li>
669 </ul>
670 </div>
673 <div class="module">
674 <h4>Methods</h4>
675 <ul class="content">
676 <li><!--<code>void</code>-->
677 <a href="#augment">augment</a>
678 </li>
679 <li><!--<code>void</code>-->
680 <a href="#extend">extend</a>
681 </li>
682 <li><!--<code>void</code>-->
683 <a href="#hasOwnProperty">hasOwnProperty</a>
684 </li>
685 <li><!--<code>void</code>-->
686 <a href="#isArray">isArray</a>
687 </li>
688 <li><!--<code>void</code>-->
689 <a href="#isBoolean">isBoolean</a>
690 </li>
691 <li><!--<code>void</code>-->
692 <a href="#isFunction">isFunction</a>
693 </li>
694 <li><!--<code>void</code>-->
695 <a href="#isNull">isNull</a>
696 </li>
697 <li><!--<code>void</code>-->
698 <a href="#isNumber">isNumber</a>
699 </li>
700 <li><!--<code>void</code>-->
701 <a href="#isObject">isObject</a>
702 </li>
703 <li><!--<code>void</code>-->
704 <a href="#isString">isString</a>
705 </li>
706 <li><!--<code>void</code>-->
707 <a href="#isUndefined">isUndefined</a>
708 </li>
709 </ul>
710 </div>
714 </div>
715 </div>
716 </div>
717 <div id="ft">
718 <hr />
719 Copyright &copy; 2007 Yahoo! Inc. All rights reserved.
720 </div>
721 </div>
722 </body>
723 </html>