/
443.txt
80 lines (60 loc) · 3.85 KB
/
443.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
* 仕様書
[REFS[
- [4] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-03-14 22:44:13 +09:00]] 版) <https://html.spec.whatwg.org/#dom-location-ancestororigins>
]REFS]
* 性質
[5] [CODE(DOMa)@en[ancestorOrigins]] [[属性]]は、 [CODE(IDL xattr)@en[Unforgeable]]
です [SRC[>>4]]。
* 取得器
[6] [CODE(DOMa)@en[ancestorOrigins]] [[属性]]は、次のようにしなければ[MUST[なりません]]
[SRC[>>4]]。
[FIG(steps)[
= [18] [[文脈オブジェクト]]の[F[[[関係する[CODE(DOMi)@en[Document]]]]]]の[F[起源][文書の起源]]と[[入口設定群オブジェクト]]の[F[起源]]が[[同じ起源ドメイン]]でなければ、
== [19] [CODE(DOMe)@en[SecurityError]] [[例外]]を[[投げ]]、ここで停止します。
= [21] [[文脈オブジェクト]]の[F[祖先起源群リスト]]を返します。
]FIG]
[23] 返される値は、[[歴史的理由]]により、 [CODE(DOMi)@en[DOMStringList]] とされています
[SRC[>>4]]。
[14] [CODE(DOMi)@en[Location]] は、
[F[[DFN[[RUBYB[祖先起源群リスト]@en[ancestor origins list]]]]]]を持ちます。
[CODE(DOMi)@en[Location]] 作成時に次の手順で得られる値に設定しなければ[MUST[なりません]]。 [SRC[>>4]]
[FIG(steps)[
= [7] [VAR[出力]]を、空の[[リスト]]に設定します。
= [8] [VAR[現在]]を、[[文脈オブジェクト]]の[F[文書]]の[F[閲覧文脈]]に設定します。
= [10] 繰り返し、
== [9] [VAR[現在]]に[F[親閲覧文脈]]がなければ、ここで繰り返しを終えます。
== [11] [VAR[現在]]を、[VAR[現在]]の[F[親閲覧文脈]]に設定します。
== [12] [VAR[出力]]の末尾に[VAR[現在]]の[F[活性文書]]の[F[起源][文書の起源]]の[F[直列化][ASCII直列化]]を追加します。
= [13] [VAR[出力]]を返します。
]FIG]
;; [16] [[親閲覧文脈]]が変化することはありません。親で [[navigate]]
が発生すれば[[入れ子閲覧文脈]]は破棄されますし、 [CODE(HTMLe)@en[iframe]]
を [[adopt]] して他の[[文書]]に移動しても、その時点で一旦[[入れ子閲覧文脈]]は破棄されます。
* 歴史
[1] [CITE@en[Bug 22699 – Expose the origins of ancestor frames]]
( ([TIME[2013-12-13 08:31:07 +09:00]] 版))
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=22699>
[2] [CITE@en[Web Applications 1.0 r8881 Spec location.ancestorOrigins]]
( ([TIME[2015-01-16 07:14:00 +09:00]] 版))
<https://html5.org/r/8881>
[3] [CITE@en[Define security around Window, WindowProxy, and Location properly · whatwg/html@acae3df]]
([TIME[2016-03-13 23:40:08 +09:00]] 版)
<https://github.com/whatwg/html/commit/acae3df652b382e9f4f1d1b4dc7e08e2b00df821>
[17] [CITE@en[Use FrozenArray for location.ancestorOrigins · whatwg/html@2971950]]
([TIME[2016-03-17 23:39:06 +09:00]] 版)
<https://github.com/whatwg/html/commit/2971950c4078d999aa9dbbc0aa0628f76d9d53f7>
[15] [CITE@en[Merge effective script origin into origin · whatwg/html@8a843f2]]
([TIME[2016-03-31 18:14:53 +09:00]] 版)
<https://github.com/whatwg/html/commit/8a843f2169a6864a3024c4329528dccb2051d275>
[20] [CITE@en[22699 – Expose the origins of ancestor frames]]
([TIME[2016-12-08 17:13:27 +09:00]])
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=22699>
[22] [CITE@en[Restore DOMStringList so ancestorOrigins can use it]]
([[annevk]]著, [TIME[2017-01-13 09:55:07 +09:00]])
<https://github.com/whatwg/html/commit/a830aef7a9087b0d879f548980f0c616df02149e>
[24] [CITE@en[Meta: add ancestorOrigins warning due to continued disagreement]]
([[annevk]]著, [TIME[2017-03-29 19:33:39 +09:00]])
<https://github.com/whatwg/html/commit/01d3caf35fd12589ff8d11ffbb1e1a513d232c04>
[25] [CITE@en[Remove Unicode serialization of an origin]]
([[annevk]]著, [TIME[2017-05-18 13:24:49 +09:00]])
<https://github.com/whatwg/html/commit/59ebd9c094d9d532458a9ee61f307bf41bc70811>