English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Window self property

JavaScript Window Object

selfA read-only property that returns the window itself.

Syntax:

window.self
if (window.parent.frames[0] != window.self) {
   // This window is not the first frame in the list!
}
Test See‹/›

Browser Compatibility

All browsers fully support the self property:

Property
selfYesYesYesYesYes

Technical Details

Return Value:Reference to the window object itself

Related References

Window (Window) Reference:window.frameElement property

Window (Window) Reference:window.parent property

Window (Window) Reference:window.top property

JavaScript Window Object