Class (Property/internal)

Internal property that returns an object class.

Availability:

ECMAScript edition - 2

This internal property returns a string value containing the class name of the containing object.

Every object type must implement this property.

It is supported by all built-in native objects in an ECMA-compliant JavaScript interpreter.

Host objects may supply any value as a Class identifying string. They may even masquerade as one of the built-in classes, but good sense suggests that if they do, then they must obey the protocol of that built-in class in precisely the same way as if they were a real built-in object. It's probably sensible for host implementers to avoid overloading the built-in class names like that.

At edition 2 of the ECMA standard, there is no publicly accessible method to retrieve this property in a script. However, the reserved keyword values suggest that this may be offered at a later revision of the standard.

See also:Array.Class, Boolean.Class, class, Date.Class, Function.Class, Internal Property, Number.Class, Object.Class, Reserved word, String.Class

Property attributes:

Internal.

Cross-references:

ECMA 262 edition 2 - section - 8.6.2

ECMA 262 edition 3 - section - 8.6.2