home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

JavaScript: The Definitive Guide

Previous Appendix C
Differences between Navigator 2.0 and 3.0

C.5 The Window Object

The Window object is one of the most important in JavaScript. It has a number of new features in Navigator 3.0:

  • The Window.scroll() method scrolls the contents of a window to specified x and y coordinates.

  • The Window.focus() and Window.blur() methods give and remove keyboard focus from a window. Calling focus() will raise the window to the top of the desktop stacking order on most platforms.

  • The onfocus() and onblur() event handlers are invoked when a window gains or loses the input focus.

  • The onerror() event handler of the Window object is invoked when a JavaScript error occurs; it gives a JavaScript program the opportunity to handle errors in its own way.

  • The Window.opener property refers to the Window object that most recently called the open() method on it.

  • The Window.closed property specifies whether a window has been closed.

  • The name property of the Window object is now read/write, so that windows (including the unnamed initial window) can change their names for use with the TARGET attribute of various HTML tags.

  • A fourth, optional argument has been added to the Window.open() method; it allows JavaScript programs to specify whether the URL loaded into the specified window should create a new entry in the History array or whether it should replace the current entry.

Previous Home Next
Image Manipulation Book Index The Location Object

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell