Chapter 9
Controlling the Browser with the Window Object
IN THIS CHAPTER
Understanding the BOM (Browser Object Model)
Opening and closing windows
Getting windows properties
Resizing windows
“In making theories, always keep a window open so that you can throw one out if necessary.”
— BELA LUGOSI
The Browser Object Model (BOM) allows JavaScript to interact with the functionality of the web browser. Using the BOM, you can create and resize windows, display alert messages, and change the current page being displayed in the browser.
In this chapter, you discover what can be done with the browser window and how to use it to write better JavaScript programs.
Understanding the Browser Environment
Web browsers are complicated pieces of software. When they work well, they operate seamlessly and integrate all their functions into a smooth and seemingly simple web browsing experience. We all know that web browsers have an occasional hiccup and sometimes even crash. To understand why this happens, and to be able to make better use of browsers, it’s important to know the many different parts ...
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