-
Notifications
You must be signed in to change notification settings - Fork 4
/
641.txt
51 lines (38 loc) · 2.16 KB
/
641.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[4] [[フレーム]]を通じて直接の上位にあたる[[閲覧文脈]]のことを、
[DFN[[RUBYB[親閲覧文脈]@en[parent browsing context]]]]といいます。
[DFN[[CODE(JS)@en[window.parent]]]]
は[[親閲覧文脈]]を表す[[オブジェクト]]を返します。
* 仕様書
[REFS[
- [2] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-03-31 07:16:44 +09:00]] 版) <https://html.spec.whatwg.org/#parent-browsing-context>
- [5] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-03-31 07:16:44 +09:00]] 版) <https://html.spec.whatwg.org/#dom-parent>
]REFS]
* 意味
[3] [[閲覧文脈]][VAR[子]]の[DFN[[F[[RUBYB[[[親閲覧文脈]]]@en[parent browsing context]]]]]]は、次のものです
[SRC[>>2]]。
[FIG(steps)[
= [13] [VAR[子]]が[[子供閲覧文脈]]であるような[[閲覧文脈]][VAR[親]]が存在するなら、
== [14] [VAR[親]]
= [15] それ以外なら、
== [16] [CODE[null]]
]FIG]
;; [17] [[親閲覧文脈]]は、高々1つだけ存在します。
* [CODE(DOMi)@en[Window]] インターフェイス [CODE(DOMa)@en[parent]] 属性
[6] [CODE(DOMi)@en[Window]] [[インターフェイス]]の
[DFN[[CODE(DOMa)@en[parent]]]] [[IDL属性]]の[[取得器]]は、
次のようにしなければ[MUST[なりません]] [SRC[>>5]]。
[FIG(steps)[
= [8] [[文脈オブジェクト]]の[F[閲覧文脈]]の[F[親閲覧文脈]]が [[null]] でなければ、
== [9] [[文脈オブジェクト]]の[F[閲覧文脈]]の[F[親閲覧文脈]]の
[F[[CODE(DOMi)@en[WindowProxy]]]] を返します。
= [10] それ以外なら、
== [11] [[文脈オブジェクト]]の[F[閲覧文脈]]の [F[[CODE(DOMi)@en[WindowProxy]]]] を返します。
]FIG]
[7] この [[IDL属性]]は、 [CODE(xattr IDL)@en[Replaceable]] です [SRC[>>5]]。
* 関連
[12] [[親閲覧文脈]]をたどった先が[[最上位閲覧文脈]]です。
[18] [[親閲覧文脈]]の[[推移的閉包]]に属する[[閲覧文脈]]を[[祖先閲覧文脈]]といいます。
* 歴史
[1] [CITE@en[Web Applications 1.0 r8780 Some reference updates, and an example of incumbent vs entry scripts]]
( ([TIME[2014-09-17 14:47:00 +09:00]] 版))
<https://html5.org/r/8780>