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


JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Window.self Property

Name

Window.self Property---the window itself

Availability

Navigator 2.0, Internet Explorer 3.0

Synopsis

window.self

Description

The self property contains a reference to the Window object specified by window, i.e., window.self is identical to window. Because a reference to the current top-level window or frame is implicit in all JavaScript expressions, the window in the above expressions can be omitted and you can simply use self to refer to the current window.

Usage

The self property provides a way to explicitly refer to the current window or frame when necessary (for example, when passing a the current window to a function). The self property is also sometimes useful for code clarity. Using self.name to refer to the name of the current window or frame is less ambiguous than simply using name, for example.

The window property is a synonym for the self property.


Previous Home Next
Window.scroll() Book Index Window.setTimeout()

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