Window.self (Property)

A reference to the window itself.

Availability:

JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Opera - 3.0
Property/method value type:Window object
JavaScript syntax:-myWindow.self
-self

This is another name for the window.window property in this context. However, self is useful because you can build reusable scripts with it that can be used with a variety of object types and instances. Don't forget that this can also refer to a frame as well as a window since they are both represented by the window object.

The self property can be used without the window prefix because it belongs to the global object in a web browser window. Using the self keyword like this makes no difference to the functionality of your script but it does make it easier to understand. For the same reason, you may want to use the window property in the same way.

See also:Frame object, self, Window object, Window.frame, Window.window

Property attributes:

ReadOnly.