번역이 완료되지 않았습니다. Please help translate this article from English

Returns a reference to the topmost window in the window hierarchy.


var topWindow =;


Where the window.parent property returns the immediate parent of the current window, returns the topmost window in the hierarchy of window objects.

This property is especially useful when you are dealing with a window that is in a subframe of a parent or parents, and you want to get to the top-level frameset.


Specification Status Comment
HTML Living Standard
The definition of '' in that specification.
Living Standard  
The definition of '' in that specification.
Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
topChrome Full support 1Edge Full support 12Firefox Full support 1
Full support 1
Notes Starting in Firefox 6, this property is read only, as defined by the standard.
IE Full support 4Opera Full support ≤12.1Safari Full support 3WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support ≤12.1Safari iOS Full support 1Samsung Internet Android Full support 1.0


Full support  
Full support
See implementation notes.
See implementation notes.