|-||myObject = Object|
|Object properties:||__parent__, __proto__, constructor, name, prototype|
|Object methods:||assign(), eval(), hasOwnProperty(), isPrototypeOf(), propertyIsEnumerable(), toLocaleString(), toSource(), toString(), unwatch(), valueOf(), watch()|
An instance of the class "Object" is created by using the new operator on the Object() constructor. The new object adopts the behavior of the built-in prototype object through the prototype-inheritance mechanisms.
All properties and methods of the prototype are available as if they were part of the instance.
An Object is a member of the type Object. It is an unordered collection of properties, each of which may contain a primitive value, another object, or a function.
The constructor is invoked by the new operator or by calling it as a Constructor function. For example:
new String("Some Text");
This will create a new object of the String type. You can invoke the constructor without the new operator but the consequences will depend on the constructor as to what it will yield as a result. In the case of the String data type, the constructor could be invoked like this:
Because this object is the topmost parent object in the prototype inheritance hierarchy, all other object classes inherit its methods and properties. However, in some cases they will get overridden or nulled out.
DOM level 2 adds the following properties:
All functions, including constructors, are themselves objects. However, not all objects are constructors. Each constructor has a Prototype property that is used to facilitate inheritance based on the prototype. It also provides for shared properties which is similar to but not the same as the Class properties that you find in true object-oriented languages.
Global variables and the scope chain mechanism
Prototype based inheritance
Creation of multiple objects and calling them within a single script
Object data is not truly private
Be very careful not to confuse this generic top-level core object with the object that MSIE instantiates to represent an <OBJECT> tag. MSIE creates OBJECT objects for that purpose but also supports Object objects. For this reason, it may be the case that interpreters cannot become case-insensitive when matching class names. If they did, then it would be impossible to distinguish between Object and OBJECT class names.
|prototype||1.1||3.0||3.0||4.0||3.0||2||, ReadOnly, DontDelete, DontEnum|
ECMA 262 edition 2 - section - 4.2.1
ECMA 262 edition 2 - section - 4.3.3
ECMA 262 edition 2 - section - 10.1.5
ECMA 262 edition 2 - section - 15.2
ECMA 262 edition 3 - section - 4.2.1
ECMA 262 edition 3 - section - 4.3.3
ECMA 262 edition 3 - section - 10.1.5
ECMA 262 edition 3 - section - 15.2