Window self Property
- Previous Page sessionStorage
- Next Page setInterval()
- Go to the Previous Level Window Object
Definition and Usage
self
The property returns the current window.
self
The property is read-only.
Tip:self
Properties are often used for comparison (see the examples below).
Instance
Is this window the topmost window:
if (window.top != window.self) { text = "This window is NOT the topmost window!"; } else { text = "This window is the topmost window!"; }
Syntax
window.self
Return Value
Type | Description |
---|---|
Object | The Window Object Itself. |
Browser Support
All Browsers Support window.self
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support | Support |
- Previous Page sessionStorage
- Next Page setInterval()
- Go to the Previous Level Window Object