• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Working with Objects > The JavaScript Object Hierarchy

The JavaScript Object Hierarchy

Sticking with the computer metaphor for just a moment longer, when you think about how the computer's hardware is put together, you see there is a kind of hierarchy to the organization. The computer itself is at the top, and then below that are major components such as the system unit and the monitor. Drilling down, you see that these also have their own subcomponents. For example, the system unit has the motherboard, the hard drive, and the power supply, to name just a few. Taking things down just one more level, the motherboard (for example) also holds smaller components such as the microprocessor and the memory chips.

The Window Object and Its Hierarchy

Most of JavaScript's objects are also organized in a hierarchical way. The top-level object represents the browser window because that's what's used to display a page. This is called the Window object. The other objects are "subobjects" of the Window object, and their organization is illustrated in Figure 8.1, which also points out the relevant chapters where you'll find detailed information about each object.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint