From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/window/parent/index.html | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 files/ja/web/api/window/parent/index.html (limited to 'files/ja/web/api/window/parent') diff --git a/files/ja/web/api/window/parent/index.html b/files/ja/web/api/window/parent/index.html new file mode 100644 index 0000000000..6e8f1e986d --- /dev/null +++ b/files/ja/web/api/window/parent/index.html @@ -0,0 +1,44 @@ +--- +title: window.parent +slug: Web/API/Window/parent +tags: + - API + - Gecko + - HTML DOM + - Window +translation_of: Web/API/Window/parent +--- +

{{ APIRef() }}

+ +

概要

+ +

現在のウィンドウ、または、サブフレームの親ウィンドウへの参照を返します。

+ +

ウィンドウが親を持たない場合、parent プロパティは、それ自身への参照となります。

+ +

ウィンドウが {{htmlelement("iframe")}} 、{{htmlelement("object")}} 、あるいは、{{htmlelement("frame")}} で読み込まれた場合、その親ウィンドウは、ウィンドウを埋め込んだ要素が存在するウィンドウとなります。

+ +

構文

+ +
parentWindow = window.parent
+
+ +

+ +
if (window.parent !== window.top) {
+  // 1 段下より深いところ
+}
+
+ +

仕様

+ + + +

関連情報

+ + -- cgit v1.2.3-54-g00ecf