1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <title>API: yahoo YAHOO.lang (YUI Library)
</title>
5 <link rel=
"stylesheet" type=
"text/css" href=
"assets/api.css">
9 <div id=
"doc3" class=
"yui-t2">
12 <h1>Yahoo! UI Library
</h1>
13 <h3>YAHOO Global
<span class=
"subtitle">2.2.0</span></h3>
15 <a href=
"./index.html">Yahoo! UI Library
</a>
16 > <a href=
"./module_yahoo.html">yahoo
</a>
32 Class
<b>YAHOO.lang
</b>
33 <span class=
"extends">
36 <span class=
"extends">
41 <!-- class tree goes here -->
46 <div class=
"summary description">
47 Provides the language utilites and extensions used by the library
53 <div class=
"section method details">
54 <h3><a name=
"methodDetails">Methods
</a></h3>
57 <a name=
"augment">augment
</a></h4>
64 <strong>augment
</strong>
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.
89 <div class=
"description">
94 <code>r
<Function
></code>
95 the object to receive the augmentation
98 <code>s
<Function
></code>
99 the object that supplies the properties to augment
102 <code>arguments
<String*
></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
123 <a name=
"extend">extend
</a></h4>
130 <strong>extend
</strong>
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.
153 <div class=
"description">
158 <code>subc
<Function
></code>
162 <code>superc
<Function
></code>
163 the object to inherit
166 <code>overrides
<Object
></code>
167 additional properties/methods to add to the
168 subclass prototype. These will override the
169 matching items obtained from the superclass
187 <a name=
"hasOwnProperty">hasOwnProperty
</a></h4>
194 <strong>hasOwnProperty
</strong>
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:
213 var A = function() {};
214 A.prototype.foo = 'foo';
217 alert(a.hasOwnProperty('foo')); // true
218 alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using fallback
222 <div class=
"description">
227 <code>obj
<any
></code>
228 The object being testing
245 <a name=
"isArray">isArray
</a></h4>
252 <strong>isArray
</strong>
262 <div class=
"description">
263 Determines whether or not the provided object is an array
266 <div class=
"description">
271 <code>obj
<any
></code>
272 The object being testing
289 <a name=
"isBoolean">isBoolean
</a></h4>
296 <strong>isBoolean
</strong>
306 <div class=
"description">
307 Determines whether or not the provided object is a boolean
310 <div class=
"description">
315 <code>obj
<any
></code>
316 The object being testing
333 <a name=
"isFunction">isFunction
</a></h4>
340 <strong>isFunction
</strong>
350 <div class=
"description">
351 Determines whether or not the provided object is a function
354 <div class=
"description">
359 <code>obj
<any
></code>
360 The object being testing
377 <a name=
"isNull">isNull
</a></h4>
384 <strong>isNull
</strong>
394 <div class=
"description">
395 Determines whether or not the provided object is null
398 <div class=
"description">
403 <code>obj
<any
></code>
404 The object being testing
421 <a name=
"isNumber">isNumber
</a></h4>
428 <strong>isNumber
</strong>
438 <div class=
"description">
439 Determines whether or not the provided object is a legal number
442 <div class=
"description">
447 <code>obj
<any
></code>
448 The object being testing
465 <a name=
"isObject">isObject
</a></h4>
472 <strong>isObject
</strong>
482 <div class=
"description">
483 Determines whether or not the provided object is of type object
487 <div class=
"description">
492 <code>obj
<any
></code>
493 The object being testing
510 <a name=
"isString">isString
</a></h4>
517 <strong>isString
</strong>
527 <div class=
"description">
528 Determines whether or not the provided object is a string
531 <div class=
"description">
536 <code>obj
<any
></code>
537 The object being testing
554 <a name=
"isUndefined">isUndefined
</a></h4>
561 <strong>isUndefined
</strong>
571 <div class=
"description">
572 Determines whether or not the provided object is undefined
575 <div class=
"description">
580 <code>obj
<any
></code>
581 The object being testing
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>
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>
668 <li class=
""><a href=
"YAHOO.js.html">YAHOO.js
</a></li>
676 <li><!--<code>void</code>-->
677 <a href=
"#augment">augment
</a>
679 <li><!--<code>void</code>-->
680 <a href=
"#extend">extend
</a>
682 <li><!--<code>void</code>-->
683 <a href=
"#hasOwnProperty">hasOwnProperty
</a>
685 <li><!--<code>void</code>-->
686 <a href=
"#isArray">isArray
</a>
688 <li><!--<code>void</code>-->
689 <a href=
"#isBoolean">isBoolean
</a>
691 <li><!--<code>void</code>-->
692 <a href=
"#isFunction">isFunction
</a>
694 <li><!--<code>void</code>-->
695 <a href=
"#isNull">isNull
</a>
697 <li><!--<code>void</code>-->
698 <a href=
"#isNumber">isNumber
</a>
700 <li><!--<code>void</code>-->
701 <a href=
"#isObject">isObject
</a>
703 <li><!--<code>void</code>-->
704 <a href=
"#isString">isString
</a>
706 <li><!--<code>void</code>-->
707 <a href=
"#isUndefined">isUndefined
</a>
719 Copyright
© 2007 Yahoo! Inc. All rights reserved.