5. Windows and Frames

The window is the most important interface element in a web browser, and as you might expect, JavaScript provides you with many tools to manipulate windows.

JavaScript deals with windows similarly to the way it deals with frames. This makes perfect sense, since frames are just other document windows within the overall browser window.

However, frames have fallen out of favor over the past few years—to the point that (except for iframes) they’ve been removed from HTML5 entirely. Consequently, ...

Get Visual QuickStart Guide: JavaScript, Ninth 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.