Windows in Action

A window object is used in all your JavaScript programs, whether you specify it or not. The window object is one level higher than the document object in the JavaScript object hierarchy and provides a developer with the ability to manipulate the current window as well as create new window instances.

The ability to create new windows allows developers to add functionality to their sites. Some sites, such as GeoCities (http://www.geocities.com) shown in Figure 5.4, have advertisers create new windows to show their advertisement banners.

Figure 5.4. Window advertisement banner.

The Parent/Child Relationship

Windows use what ...

Get Pure JavaScript 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.