ancestorOrigins

Location インターフェイス ancestorOrigins 属性 (DOM)

仕様書

性質

[5] ancestorOrigins 属性は、 Unforgeable です >>4

取得器

[6] ancestorOrigins 属性は、次のようにしなければなりません >>4

  1. [18] 文脈オブジェクト関係するDocument起源入口設定群オブジェクト起源同じ起源ドメインでなければ、
    1. [19] SecurityError 例外投げ、ここで停止します。
  2. [21] 文脈オブジェクト祖先起源群リストを返します。

[23] 返される値は、歴史的理由により、 DOMStringList とされています >>4

[14] Location は、 祖先起源群リスト (ancestor origins list) を持ちます。 Location 作成時に次の手順で得られる値に設定しなければなりません>>4

  1. [7] 出力を、空のリストに設定します。
  2. [8] 現在を、文脈オブジェクト文書閲覧文脈に設定します。
  3. [10] 繰り返し、
    1. [9] 現在親閲覧文脈がなければ、ここで繰り返しを終えます。
    2. [11] 現在を、現在親閲覧文脈に設定します。
    3. [12] 出力の末尾に現在活性文書起源直列化を追加します。
  4. [13] 出力を返します。
[16] 親閲覧文脈が変化することはありません。親で navigate が発生すれば入れ子閲覧文脈は破棄されますし、 iframeadopt して他の文書に移動しても、その時点で一旦入れ子閲覧文脈は破棄されます。

歴史

[1] Bug 22699 – Expose the origins of ancestor frames ( ( 版)) https://www.w3.org/Bugs/Public/show_bug.cgi?id=22699

[2] Web Applications 1.0 r8881 Spec location.ancestorOrigins ( ( 版)) https://html5.org/r/8881

[3] Define security around Window, WindowProxy, and Location properly · whatwg/html@acae3df ( 版) https://github.com/whatwg/html/commit/acae3df652b382e9f4f1d1b4dc7e08e2b00df821

[17] Use FrozenArray for location.ancestorOrigins · whatwg/html@2971950 ( 版) https://github.com/whatwg/html/commit/2971950c4078d999aa9dbbc0aa0628f76d9d53f7

[15] Merge effective script origin into origin · whatwg/html@8a843f2 ( 版) https://github.com/whatwg/html/commit/8a843f2169a6864a3024c4329528dccb2051d275

[20] 22699 – Expose the origins of ancestor frames () https://www.w3.org/Bugs/Public/show_bug.cgi?id=22699

[22] Restore DOMStringList so ancestorOrigins can use it (annevk著, ) https://github.com/whatwg/html/commit/a830aef7a9087b0d879f548980f0c616df02149e

[24] Meta: add ancestorOrigins warning due to continued disagreement (annevk著, ) https://github.com/whatwg/html/commit/01d3caf35fd12589ff8d11ffbb1e1a513d232c04

[25] Remove Unicode serialization of an origin (annevk著, ) https://github.com/whatwg/html/commit/59ebd9c094d9d532458a9ee61f307bf41bc70811

[26] Remove frameType, maybe add ancestorOrigins · Issue #732 · w3c/ServiceWorker () https://github.com/w3c/ServiceWorker/issues/732