O'Reilly logo

The JavaScript PocketGuide by Lenny Burdette

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9. Browsers and Windows

You learned in previous chapters that window is the global object in client-side JavaScript. Many of its properties and methods are part of the core JavaScript language, but it also has many other that are specific to programming in the browser. This chapter gives a quick overview and reference of the properties and methods that directly relate to browsers and browser windows.

Properties

Browser windows have a couple of properties that mostly deal with the size and position of the window on the screen. These properties are read-only, and you’ll need to use the window methods described in the next sections to change their values.

innerHeight, innerWidth Represent the pixel values of the size of the browser viewport. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required