Window: top property
BaselineWidely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Returns a reference to the topmost window in the window hierarchy.
Value
The reference to the topmost window.
Notes
Where thewindow.parent
property returns the immediate parent of thecurrent window,window.top
returns the topmost window in the hierarchy ofwindow objects.
This property is especially useful when you are dealing with a window that is in asubframe of a parent or parents, and you want to get to the top-level frameset.
Specifications
Specification |
---|
HTML # dom-top-dev |