A Look at the WINDOW Object

The WINDOW object in JavaScript is on the top of the JavaScript hierarchy; the DOCUMENT object and the objects below it are all descendants of the WINDOW object. The projects that we have done thus far have been contained within a single window, so we have never needed to deal with the WINDOW object or its properties. However, this is not always the case. There are many occasions when it is advantageous to create a new window or access objects contained within another window.

Because the window is an object, not only are we able to access the properties and objects contained within the window, but the window itself has properties of its own. Using JavaScript, we can modify a window's size, configure its toolbars, access ...

Get Essential JavaScript™ for Web Professionals, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.