Internal properties are not exposed to the programmer using ECMA-compliant JavaScript. However, some implementations may allow you to view them through a debugging interface. The reserved words suggest that at least some of these internal properties may be made visible at a later stage of the language development.
Run time errors may be generated due to faults in the interpreter logic trying to access internal methods that do not exist.
Property | Parameters | Description |
---|---|---|
Call | A list of argument values | This method executes some code associated with the object via a function call mechanism. Objects that implement this internal method are called functions. |
CanPut | A property name | Returns a Boolean value indicating whether you can put values into the named property. |
Class | none | A string value describing what kind of object this is. |
Construct | A list of argument values | This constructs an object and is normally invoked by the new operator. Objects that implement this internal method are called constructors. |
DefaultValue | A hint value | Returns a default value for the object which should be a primitive value and not an object or a reference to one. |
Delete | A property name | Removes the specified property from the object. |
Get | A property name | This method returns the value of the named property. |
HasInstance | A value | Returns a Boolean value indicating whether there is an instance. This only applies to Function objects. |
HasProperty | A property name | Returns a Boolean value indicating whether that property is available as a member of this object. |
Match | A string and an index | Tests for a regular expression and returns a match result. |
Prototype | none | Returns the prototype of this object. |
Put | A property name and a value | This method stores the value in the named property. |
Scope | none | A scope chain for the Function object to be executed in. |
Value | none | Internal state information associated with this object. |
The table describes the base set of ECMA-compliant internal properties. Hosted implementations may add to these and implement special properties in any way they need to. Host implementations may not implement all of these properties.
Every object must implement the Class property.
The value of the Prototype property must be either an object or null. Every prototype chain must have finite length, that is to say starting from any object, traversing the prototype chain must ultimately yield a null value. Whether or not a native object can refer to a host object as its prototype is implementation dependant.
ECMA edition 3 introduces the following internal methods/properties:
HasInstance
Scope
Match
See also: | Class, class, Internal Method, Object, prototype property, Value property |
Prev | Home | Next |
Internal Method | Up | Internet Explorer |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |