self property (window)
Returns a reference to the window object itself.
The use of the self property is optional, the window.self and window forms are equivalent. Sometimes the use of the self property may result in readable code.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Reference to the window object itself.
Default: this property has no default value.
Example HTML code 1:
This example illustrates a case when the use of the self property causes more readable code:
Did you find this example helpful?
User Contributed Comments