window.parent
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Please take two minutes to fill out our short survey.
概要
構文
parentWindow = window.parent
例
js
if (window.parent !== window.top) {
// 1 段下より深いところ
}
仕様書
関連情報
window.frameElement
-window
が埋め込まれた(<iframe>
要素などの)特定の要素を返すwindow.top
- 最上位ウィンドウへの参照を返す