Object is the primitive JavaScript object type. All JavaScript objects
are descended from Object. That is, all JavaScript objects have the methods
defined for Object.
Platform Support
IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|
4.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
Constructors
Constructor | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
Object Constructor([String value]) : Object|Number|String|Boolean
Creates a new instance of an Object.
|
Show Details | 4.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
constructor : Function
Specifies the function that creates a prototype of an object.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
prototype : Object
Represents the prototype for this class. You can use the prototype to add
properties or methods to all instances of a class.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
Functions
Method | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
eval(string string) : Number|Object|String
Deprecated. Evaluates a string of JavaScript code in the context of an
object.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
hasOwnProperty(String propname) : Boolean
Checks whether a property is inherited.
|
Show Details | 5.5+ | 1.0+ | 6.0+ | 7.0+ | no |
isPrototypeOf(Object object) : Boolean
Returns true if the object is a prototype of another.
|
Show Details | 5.5+ | 1.0+ | 6.0+ | 7.0+ | no |
propertyIsEnumerable(String property) : Boolean
Returns true if the property can be enumerated in a for/in loop.
|
Show Details | 5.5+ | 1.0+ | 6.0+ | 7.0+ | no |
toLocaleString() : String
Returns a localized string representation of an object.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
toSource() : String
Returns a string representing the source code of the object.
|
Show Details | no | 1.0+ | 4.06+ | no | no |
toString() : String
Returns a string representing the specified object.
|
Show Details | 4.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
unwatch(String prop) : Object
Removes a watchpoint set with the watch method.
|
Show Details | no | no | 4.0+ | 7.0+ | no |
valueOf() : Object
Returns the primitive value of the specified object
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
watch(String prop, String handler) : Object
Watches for a property to be assigned a value and runs a function when
that occurs.
|
Show Details | no | no | 6.0+ | 7.0+ | no |
References
Array|Boolean|Function|Function.prototype|Number|String
Availability
JavaScript objectsJavaScript 1.0|JScript 1.0|ECMAScript v1