Working with Windows as Objects

Because windows are objects, you manipulate them just as you would any object (see Chapter 2 for a discussion of objects and methods), by using JavaScript's dot notation to apply one of the available methods to the window object you name:

window_name.method_name();

This chapter introduces the methods that JavaScript provides for the most important window operations, along with useful properties you can specify for a window object.

Get The Book of JavaScript, 2nd 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.