Chapter 16. Window and Frame Objects
IN THIS CHAPTER
Scripting communication among multiple frames
Creating and managing new windows
Controlling the size, position, and appearance of the browser window
Details of window, frame, frameset, and iframe objects
A quick look at the basic document object model diagram in Chapter 14 (see Figure 14-1) reveals that the window object is the outermost, most global container of all document-related objects that you script with JavaScript. All HTML and JavaScript activity takes place inside a window. That window may be a standard Windows, Mac, or XWindows application-style window, complete with scroll bars, toolbars, and other chrome; you can also generate windows that have only some of a typical window's chrome. A frame is also a window, even though a frame doesn't have many accoutrements beyond scroll bars. The window object is where everything begins in JavaScript references to objects. Modern browsers treat the frameset as a special kind of window object, so it is also covered in this chapter.
Of all the objects associated with browser scripting, the window and window-related objects have by far the most object-specific terminology associated with them. This necessitates a rather long chapter to keep the discussion in one place. Use the running footers as a navigational aid through this substantial collection of information.
Window Terminology
The window object is often a source of confusion when you first learn about the document object model. A ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access