JavaScript Object Hierarchy

Many JavaScript objects are contained within each other. JavaScript objects have a container to contained object relationship rather than a class and subclass relationship. Properties are not inherited from one type of object to another. There are two main types of JavaScript objects.

  • Language Objects - Objects provided by the language and are not dependent on other objects.
  • Navigator - Objects provided by the client browser. These objects are all sub objects to the navigator object.

Beyond that, objects are those created by the programmer.

The JavaScript Hierarchy

JavaScript Object Hierarchy

The "Language" box shown in the drawing is a little misleading. It is not an object, but is used in the drawing to illustrate the grouping of the objects supported by the JavaScript language. Other references to objects include:

  • Parent
  • Self
  • Top