JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference

Window.self Property


Window.self Property---the window itself


Navigator 2.0, Internet Explorer 3.0




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.


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 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.

See Also

"Window", "Window.window"

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
Hosted by uCoz