JavaScript » Objects » Area

An Area object is a type of Link object and shares the same attributes. It defines an area of an image as an image map. When you click on an area, that area's hypertext reference is loaded into the target window. For more information on the Area object, see the Link object.

Properties

constructor

Syntax: Object.constructor

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

prototype

Syntax: Object.prototype.name = value

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

Methods

eval

Syntax: Object.eval(string)

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.

toSource

Syntax: Object.toSource()

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

toString

Syntax: Object.toString()

The toString method returns a string representing a specified object.

unwatch

Syntax: Object.unwatch(property)

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

valueOf

Syntax: Object.valueOf()

This method returns a primitive value for a specified object.

watch

Syntax: Object.watch(property, handlerfunction)

This method adds a watchpoint to a property of the object.