/
114.txt
92 lines (73 loc) · 3.61 KB
/
114.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[16] [CODE(DOMi)@en[Window]] [[インターフェイス]]の
[DFN[[CODE(DOMa)@en[frameElement]]]]
[[IDL属性]]は、本[[窓]]が[[フレーム]]の場合に、それを表す[[要素]]を返します。
* 仕様書
[REFS[
- [8] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-03-31 07:16:44 +09:00]] 版) <https://html.spec.whatwg.org/#dom-frameelement>
]REFS]
* 取得器
[9] [CODE(DOMi)@en[Window]] [[インターフェイス]]の
[DFN[[CODE(DOMa)@en[frameElement]]]]
[[IDL属性]]は、次のようにしなければ[MUST[なりません]] [SRC[>>8]]。
[FIG(steps)[
= [21]
[VAR[現在]]を、
[VAR[[[文脈オブジェクト]]]]の[F[閲覧文脈]]に設定します。
= [22]
[VAR[現在]]が
[CODE[null]] の場合、
== [23]
[CODE[null]]
を返します。
= [25]
それ以外で、
[VAR[現在]]が[[子供閲覧文脈]]で''ない''の場合、
== [27]
[CODE[null]] を返します。
= [28]
それ以外の場合、
== [29]
[VAR[包含子]]を、
[VAR[現在]]の[F[閲覧文脈包含子]]に設定します。
== [20]
[VAR[包含子]]の[F[節点文書]]の[F[起源][文書の起源]]と[[現在設定群オブジェクト]]の[F[起源]]が[[同じ起源ドメイン]]でない場合、
=== [10] [CODE[null]] を返します。
== [14] それ以外の場合、
=== [26] [VAR[閲覧文脈]]の[F[閲覧文脈包含子]]を返します。
]FIG]
* 関連
[15] [CODE(DOMa)@en[contentWindow]] は、逆方向の[[IDL属性]]です。
* 歴史
[1] [CITE@en[Compound Document by Reference Framework 1.0]]
( ([TIME[2010-08-17 16:50:04 +09:00]] 版))
<http://www.w3.org/TR/CDR/#child-to-parent-dom-access>
[2] [CITE@en-US[Window Object 1.0]]
( ([TIME[2006-04-08 02:19:28 +09:00]] 版))
<http://www.w3.org/TR/Window/#embedding>
[3] [CITE@en[829872 – Consider returning null from contentDocument getters when the caller does not subsume the document]]
( ([TIME[2013-11-13 20:44:00 +09:00]] 版))
<https://bugzilla.mozilla.org/show_bug.cgi?id=829872>
[4] [CITE@en[868235 – window.frameElement should throw for cross-origin parents]]
( ([TIME[2013-11-13 21:24:15 +09:00]] 版))
<https://bugzilla.mozilla.org/show_bug.cgi?id=868235>
[5] [CITE@en[Let frameElement return null in cross-origin situations · whatwg/html@3dc7dc9]]
([TIME[2015-10-21 11:32:44 +09:00]] 版)
<https://github.com/whatwg/html/commit/3dc7dc993e5faa35f3c56acdfc037ab1d7b7c438>
[6] [CITE@en[Clarify the definition of window.frameElement · whatwg/html@a398377]]
([TIME[2016-02-10 22:52:09 +09:00]] 版)
<https://github.com/whatwg/html/commit/a398377bbc8483e27c4fc478a097ef72f3057593>
[7] [CITE@en[Merge effective script origin into origin · whatwg/html@8a843f2]]
([TIME[2016-03-31 16:46:10 +09:00]] 版)
<https://github.com/whatwg/html/commit/8a843f2169a6864a3024c4329528dccb2051d275>
[17] [CITE@en[Use "current settings object" in the frameElement origin check]]
([[domenic]]著, [TIME[2016-07-13 06:34:08 +09:00]])
<https://github.com/whatwg/html/commit/921499fbc6d84424ebf569fe58ad82dabc9b59a0>
[18] [CITE@en[Be more precise about nested and discarded browsing contexts]]
([[domenic]]著, [TIME[2016-07-20 22:58:49 +09:00]])
<https://github.com/whatwg/html/commit/39118df640ad4a3f03f164fb5ffe0a56316297be>
[19] [CITE@en[Editorial: modernize Window's parent and frameElement]]
([[annevk]]著, [TIME[2019-02-22 19:46:09 +09:00]])
<https://github.com/whatwg/html/commit/140fde2fbde648c4d7cb19967a473c7442a0120c>
[11] [CITE@en[Editorial: modernize Window's parent and frameElement by annevk · Pull Request #4380 · whatwg/html]]
([TIME[2019-07-15 20:20:19 +09:00]])
<https://github.com/whatwg/html/pull/4380>