Chapter 9: The Window Object

Every JavaScript environment has a global object. Any variables that are created in the global scope are actually properties of this object, and any functions are methods of it. In a browser environment the global object is the window object, which represents the browser window that contains a web page.

In this chapter, we’ll cover these topics:

  • The Browser Object Model

  • Finding out browser information

  • Browser history

  • Controlling windows

  • Cookies

  • Timing functions

  • Our project ― we'll add a countdown timer to our quiz

The Browser Object Model

The Browser Object Model (or BOM for short) is a collection of properties and methods that contain information about the browser and computer screen. For example, we can ...

Get JavaScript: Novice to Ninja, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.