OBJECT:  Object

Object is the primitive Javascript object from which all other objects are derived. They therefore have all the methods defined for Object.

It is created by using the Object constructor as follows:

Code:
new Object()

PROPERTIES

constructor Property
This specifies a function to create an object's property and is inherited by all objects from their prototype.

Syntax: Object.constructor

prototype Property
This allows the addition of properties and methods to any object.

Syntax: Object.prototype.name = value

METHODS

eval Method
The eval method is deprecated as a method of Object, but is still used as a high level function. It evaluates a string of JavaScript in the context of an object.

Syntax: Object.eval(string)

toSource MethodNetscape Only Feature
The toSource method returns a literal representing the source code of an object. This can then be used to create a new object.

Syntax: Object.toSource()

toString Method
The toString method returns a string representing a specified object.

Syntax: Object.toString()

unwatch MethodNetscape Only Feature
This method removes a watchpoint set for an object and property name with the watch method.

Syntax: Object.unwatch(property)

valueOf Method
This method returns a primitive value for a specified object.

Syntax: Object.valueOf()

watch MethodNetscape Only Feature
This method adds a watchpoint to a property of the object.

Syntax: Object.watch(property, handler)

Copyright 2000 by Infinite Software Solutions, Inc.
Trademark Information