作成URL

環境設定群オブジェクト (Web)

[4] 環境設定群オブジェクト (environment settings object) は、 スクリプト実行やイベントループに関わる諸条件の集合体です。 大域オブジェクトごとに存在します。

仕様書

意味

[18] 環境設定群オブジェクト大域オブジェクト (と Realm) には常に1対1の関係があります。

[65] 以前はスクリプト設定群オブジェクト (script settings object) と呼ばれていました。

[70] 複合語となるときは、省略されて「設定群オブジェクト (settings object) 」となります。

状態

[181] 環境 (environment) は、次の状態を持ちます >>3

識別子 (id)
空文字列または環境を固有に識別する不透明文字列です。
[62] 作成URL (creation URL)
関連付けられた資源URL です。 文書の番地とは違って、 pushState などにより変化しません。
対象閲覧文脈 (target browsing context)
null またはnavigation requestの対象の閲覧文脈
活性サービスワーカー
null または環境制御するサービスワーカー
実行準備完了フラグ (execution ready flag)
フラグ。初期値は活性文書の設定で変更されます。
[16] 起源 >>3
スクリプトを介した多くの操作のセキュリティー検査に使われる起源です。 (HTML Standard の定義では環境設定群オブジェクトにあって環境にはありませんが、 環境サービスワーカークライアントとして使われるときには定義されます。 環境設定群オブジェクトの起源参照。)

[5] 環境設定群オブジェクトは、環境に加えて、次の状態を持ちます。

realm実行文脈
環境設定群オブジェクトを使うすべてのスクリプト (同じ realm のすべてのスクリプト) で共有するJavaScript実行文脈>>3
モジュール写像 >>3
利用するモジュールに関する情報を保持する写像です。
[10] 有責閲覧文脈 (responsible browsing context)
設定群オブジェクトを使うスクリプトによる動作に責任をもつ閲覧文脈です。 >>3 強い参照です >>59
[11] 有責文書 (responsible document)
設定群オブジェクトを使うスクリプトによる動作に責任を持つ文書です。 >>3 強い参照です >>59
[12] 有責イベントループ (responsible event loop)
どのイベントループを使うか自明でない時に使うイベントループです。 >>3 イベントループから逆方向に参照されることもあります (イベントループ環境設定群オブジェクト弱集合)。
[14] API URL文字符号化 (API URL character encoding)
設定群オブジェクトを使うスクリプトが呼ぶ APIURL符号化するために使われる文字符号化です。 >>3
[15] API基底URL (API base URL)
設定群オブジェクトを使うスクリプトが呼ぶ API相対URL解決するために使われる絶対URLです。 >>3
HTTPS状態
環境設定群オブジェクトに関連付けられた資源輸送路の保安特性です >>3
参照元ポリシー
fetch の際に要求参照元の決定に関与します。
非保安要求ポリシー
http:https:URL 書き換えを行うか否か。
非保安navigate格上げ集合
navigate 時に http:https:URL 書き換えを行うか否か。
未決拒絶された約束弱集合
拒絶された約束オブジェクトのリスト。初期状態ではです。
これから通知する拒絶された約束リスト
拒絶された約束オブジェクトのリスト。初期状態ではです。
大域オブジェクト
RealmGlobalObject >>3強い参照です >>59
Realm
realm実行文脈Realm >>3
時刻起源
文脈的保安保安文脈非保安文脈
保安文脈であるか否か
[23] 仕様上各構成要素は値ではなく、アルゴリズムとなっています。各構成要素は固定の値を持つのではなく、 参照される時点で評価した結果の値が用いられることになります。

[73] かつては次のような規定がありました。

[6] スクリプト実行環境 (script execution environment)
利用者エージェントが対応している各スクリプト言語について、 当該スクリプト言語に依存したスクリプト実行環境の性質です。 >>3 [7] JavaScript の場合、解釈器 (interpreter) 実行文脈のスタック大域コード関数コードと得られた Function オブジェクト、その他です。 >>3 これは JavaScript 以外の言語への対応が廃止されたため、 realm実行文脈に変更されました。
[8] 大域オブジェクト (global object)
設定群オブジェクトを使うスクリプトコードが呼べる API を提供するオブジェクトです。 >>3 [9] これが空のオブジェクトだと、環境に作用することを何もできません。 >>3 [60] 強い参照です >>59
[13] API参照子源 (API referrer source)
リファラーの決定に使われていました。 fetch との統合により廃止されています。 Referrer Policy との統合により referrer の決定はかなり複雑化しています。
[17] 実効スクリプト起源 >>3
スクリプトを介した一部の操作のセキュリティー検査に使われる起源です。 document.domain の影響を受けます。

Window の場合

[21] JavaScript実行文脈実行文脈予約環境環境設定群オブジェクトは、 次のようなものです。 ここで、 realm は、実行文脈Realm とします。 は、realm大域オブジェクトとします。

[175] 環境設定群オブジェクト
識別子
予約環境null なら、新しい固有識別子。 それ以外なら、予約環境識別子>>3
作成URL
予約環境null なら、作成時点での、文書番地。 それ以外なら、予約環境作成URL>>3
対象閲覧文脈
予約環境null なら、 null。 それ以外なら、予約環境対象閲覧文脈>>3
活性サービスワーカー
予約環境null なら、 null。 それ以外なら、予約環境活性サービスワーカー>>3
[22] realm実行文脈
実行文脈>>3
モジュール写像
文書モジュール写像>>3
[25] 有責閲覧文脈
閲覧文脈>>3
[26] 有責文書
文書>>3
[27] 有責イベントループ
閲覧文脈が属する関連する類似起源閲覧文脈の単位イベントループ>>3
[29] API URL文字符号化
文書文字符号化>>3
[30] API基底URL
文書基底URL>>3
[31] 起源
文書起源>>3
HTTPS状態
文書HTTPS状態>>3
参照元ポリシー
次の手順群の返す値 >>3
  1. [168] 文書を、文書に設定します。
  2. [169] 文書iframe srcdoc文書文書参照元ポリシー空文字列の間、繰り返し、
    1. [170] 文書を、 文書閲覧文脈包含子文書に設定します。
  3. [171] 文書参照元ポリシーを返します。
時刻起源
文書時刻起源
[78] 先述の通り、各欄は (作成時点と断っているものを除き) 初期化時の値ではなく、 アクセス時点の値を使います。

[71] この初期設定の実行を HTML Standard実行文脈に関する閲覧文脈環境設定群オブジェクトの設定 (set up a browsing context environment settings object) >>3 と呼んでいます。 閲覧文脈の作成document.open から呼び出されます。 その際、 realmHostDefined は、この初期設定された環境設定群オブジェクトに設定されます >>3。 また、予約環境null でなければ、 予約環境識別子空文字列に設定されます >>3

専用ワーカーと共有ワーカーの場合

[35] ワーカーについては、 JavaScript実行文脈実行文脈環境設定群オブジェクト外側設定群についてワーカー環境設定群オブジェクトを設定 (set up a worker environment settings object) する手順により、 次のような環境設定群オブジェクトワーカー作成時に作られます。 ここで、 realm は、実行文脈Realm とします。 大域オブジェクトは、realm大域オブジェクトとします。

[182] 環境設定群オブジェクト
識別子
新しい固有識別子 >>34
作成URL
大域オブジェクトワーカーのURL >>34
対象閲覧文脈
null >>34
活性サービスワーカー
null >>34
[36] realm実行文脈
実行文脈>>34
モジュール写像
大域オブジェクトモジュール写像>>34
有責閲覧文脈
作成時点での、外側設定群有責閲覧文脈>>34
有責文書
なし。 >>34
有責イベントループ
新たに作成したイベントループ>>34
API URL文字符号化
UTF-8>>34
API基底URL
大域オブジェクトワーカーのURL>>34
起源
作成時点における、 大域オブジェクトワーカーのURLschemedata なら不透明起源、 そうでなければ外側設定群起源>>34
HTTPS状態
大域オブジェクトHTTPS状態>>34
参照元ポリシー
大域オブジェクト参照元ポリシー>>34
非保安要求ポリシー
作成時点で、外側設定群非保安要求ポリシーが 「格上げする」なら、「格上げする」 >>69、それ以外の場合は「格上げしない」。
非保安navigate格上げ集合
作成時点での、外側設定群非保安navigate格上げ集合の各値を含む集合>>69
時刻起源
大域オブジェクト時刻起源
[33] ワーカー閲覧文脈のように他の文書に切り替わることがないので、 作成時の値がその後もそのまま使われます。

[76] なお、 realmHostDefined は、 この初期設定された環境設定群オブジェクトに設定されます >>34

サービスワーカーの場合

[215] サービスワーカーを走らせる処理では、 Realm実行文脈大域文脈ワーカークライアントについて次のように設定されます >>214

Realm実行文脈
Realm実行文脈
大域オブジェクト
大域文脈
有責イベントループ
新しいイベントループ
参照元ポリシー
大域文脈参照元ポリシー
API URL文字符号化
UTF-8
API基底URL
ワーカースクリプトURL
起源
クライアント起源
作成URL
大域文脈URL
HTTPS状態
大域文脈HTTPS状態

演算

[38] postMessage では、設定群オブジェクトに関して transfer a Transferable object が実行されます。この手順では、 特定環境で作られたオブジェクトを他の環境へと移し替える操作が行われます。


[231] 環境には、 環境廃棄手順群 (environment discarding steps) があります HTML Standard

[232] navigateワーカーを走らせる手順群から呼び出される場合があります。

設定群オブジェクト (JavaScript 実行文脈)

[41] JavaScript実行文脈設定群オブジェクト (JavaScript execution context's settings object) は、 そのJavaScript実行文脈ScriptOrModuleHostDefinedスクリプト設定群オブジェクトです >>24

設定群オブジェクト (Realm)

[61] Realm設定群オブジェクト (the Realm's settings object) >>45 は、 Realm に対応する環境設定群オブジェクトです。 両者には常に1:1の対応関係が存在します。

[74] JavaScript仕様書上の概念では、 RealmHostDefined設定群オブジェクトを表しています。

設定群オブジェクトの選択

[97] 色々な場面で設定群オブジェクト大域オブジェクトRealm を参照するに当たり、 どれを使うかについて、次の4種類の選択肢があります >>96

入口 (entry)
現在走っているスクリプトを開始したスクリプト (利用者エージェントから著者のコードを呼び出したところのスクリプトまたは関数) に関するものです。
現職 (incumbent)
スタック上で最も直近に入った著者関数や、 現在走っているコールバックを元々スケジューリングした著者スクリプト関数に関するものです。
現在 (current)
現在走っている関数オブジェクト (JavaScript 以外で実装されている利用者エージェントの組み込みの関数を含む。) に関するものです。
(あるプラットフォームオブジェクトに) 関連 (relevant)
現在走っている関数オブジェクトthis 値やいずれかの引数などのプラットフォームオブジェクトRealm のもの。

[75] JavaScript 自体の機能は、現在を使っています。 Web の機能は、原則として関連を使うべきです>>96

[98] 例えば、同じオブジェクトを何度も返すような場合、そのオブジェクトの作成には、 文脈オブジェクト関連を使うべきです >>96。 (これは、違う Realmオブジェクトをずっと保持し続けなければならないのを防ぐためです。 >>96)

[174] コンストラクターでは、関連となるものが無いので、 現在を使うべきです >>96

[99] 後方互換性のため、この原則に従わないものも少なくありません。 この原則は2016年の HTML Standard の改訂で整備され、 既存のメソッド等も (Web互換性を失わない範囲で) 整理されています。

[105] 入口設定群オブジェクトは、関連する類似起源閲覧文脈の単位内のスクリプト基底URL解決その他に用いられます。

[106] 現職設定群オブジェクトは、候補かどうかを問わず一番最近追加されたスクリプト設定群オブジェクトです。

[107] 現職設定群オブジェクト入口設定群オブジェクトの使い分けは明確には説明されていないのですが、

... となっているようです。

[108] 入口設定群オブジェクトハイパーリンクをたどる処理の定義でも参照されていて、 入口設定群オブジェクトがあればスクリプトからの呼び出しということで例外を投げ、 そうでなければ何もしないという判断に使われています。

[40] かつては関連する類似起源閲覧文脈の単位ごとに1つ、 スクリプト設定群オブジェクトのスタックがあるとされていました。 その後 JavaScript実行文脈スタック上の状態に応じて、 入口設定群オブジェクト現職設定群オブジェクトが決まると改められました。

[173] 当初は Web でも JavaScript と同じく現在を原則とすることが検討されましたが、 現実的には関連を原則とせざるを得ないと改められました。


[200] この他に、環境設定群オブジェクトアルゴリズムへの入力として与えられて、 それを使って処理することがあります。 (もちろんその入力は、先述の4種類のいずれかの形で得られたものです。)

[202] アルゴリズムへの入力の形になった環境設定群オブジェクト環境は、 「クライアント」と呼ばれることがあります。

入口設定群オブジェクト

[115] 入口実行文脈 (entry execution context) は、 JavaScript実行文脈スタックにある最も直近に push された Realm実行文脈です。 >>96

[116] 入口Realm (entry Realm) は、入口実行文脈Realmです。 >>96

[117] 入口設定群オブジェクト (entry settings object) は、入口Realm環境設定群オブジェクトです >>96

[118] 入口大域オブジェクト (entry global object) は、入口Realm大域オブジェクトです >>96

[222] 入口実行文脈 (entry execution context) は、 JavaScript実行文脈スタックにある最も直近に push された入口計数器0 より大きな実効文脈です。 >>96

[114] realm実行文脈は、そのコード評価状態において、 入口計数器 (entrance counter) を持ちます。 初期値は 0 です。 >>96

[101] 初期の定義: 入口設定群オブジェクト (entry settings object) は、 スクリプト設定群オブジェクトのスタックで一番最近追加された候補入口設定群オブジェクトたるスクリプト設定群オブジェクトです。 そのようなスクリプト設定群オブジェクトがなければ、入口設定群オブジェクトはありません。 >>201

[100] その後の定義: 入口設定群オブジェクト (entry settings object) は、 JavaScript実行文脈スタック中のJavaScript実行文脈設定群オブジェクト候補入口設定群オブジェクトフラグが立っているもののうち、 スタック上で最上に位置するものです >>201

[102] JavaScript実行文脈スタック中にあるJavaScript実行文脈設定群オブジェクトとして設定されたスクリプト設定群オブジェクトには、 候補入口設定群オブジェクト (candidate entry settings object) >>204 というフラグがあります。

[103] 同じスクリプト設定群オブジェクトが複数回JavaScript実行文脈スタック上に現れることがありますから、 このフラグは環境設定群オブジェクト自体のフラグというよりは、 スタック上のエントリーに属するフラグです。

[104] このフラグはコールバックを走らせる準備の手順内で実行文脈push される時に付与されます。 JavaScriptSourceElements の評価によって push される際には付与されません。おおよそ、利用者エージェントからスクリプトを呼び出す際のスクリプト設定群オブジェクトが候補になるといえます。

現職設定群オブジェクト

[153] JavaScript実行文脈は、コード評価状態において、 現職決定時に飛ばす計数器 (skip-when-determining-incumbent counter) を持ちます。 初期値は 0 です。 >>96

コールバックの実行時に変化します。

[154] イベントループは、バックアップ現職設定群オブジェクトスタック (backup incumbent settings object stack) を持ちます。 初期状態は、です。 >>96

[155] 最上スクリプト持ち実行文脈 (topmost script-having execution context) は、 JavaScript実行文脈スタックScriptOrModulenull でない最上のものです。そのようなものがなければ、 null です。 >>96

[156] 現職設定群オブジェクト (incumbent settings object) は、 次の手順群が返すものです >>96

  1. [157] 文脈を、最上スクリプト持ち実行文脈に設定します。
  2. [158] 文脈null か、文脈現職決定時に飛ばす計数器0 より大きいなら、
    1. [159] バックアップ現職設定群オブジェクトスタックなら、現職設定群オブジェクトは存在せず、使うことができません。
    2. [160] それ以外なら、バックアップ現職設定群オブジェクトスタックの最上の設定群オブジェクトを返します。
  3. [161] それ以外なら、
    1. [162] 文脈Realm設定群オブジェクトを返します。

[163] 現職Realm (incumbent Realm) は、 現職設定群オブジェクトRealmです >>96

[165] 現職大域オブジェクト (incumbent global object) は、現職設定群オブジェクト大域オブジェクトです >>96

[130] かつての定義: 現職設定群オブジェクト (incumbent settings object) は、 スクリプト設定群オブジェクトのスタックに一番最近追加されたスクリプト設定群オブジェクトです。 スクリプト設定群オブジェクトがなければ、現職設定群オブジェクトはありません。 >>209

[54] その後の定義: 現職設定群オブジェクト (incumbent settings object) は、 次のようにして得られるものです >>209

  1. [125] 結果を、 GetActiveScriptOrModule() 抽象操作の結果に設定します。
  2. [126] 結果が null なら、
    1. [127] 現職設定群オブジェクトはありません。
  3. [128] それ以外なら、
    1. [129] 結果HostDefinedスクリプト設定群オブジェクトを返します。

[131] 入口設定群オブジェクトは、スクリプト設定群オブジェクトのスタックのうち候補入口設定群オブジェクトとされているもののみから一番最近のものを選んでいますから、 現職設定群オブジェクトと同じになることもあれば、違うこともあります。

[132] スクリプト設定群オブジェクトのスタック関連する類似起源閲覧文脈の単位ごとにありますから、 現職設定群オブジェクト関連する類似起源閲覧文脈の単位ごとに存在します。

[133] 現職設定群オブジェクトは、API起源の検査などに使われます。

[134] 本来、同一起源ポリシーにより、スクリプトが呼び出せるのは同じ起源スクリプトだけのはずですから、どの環境設定群オブジェクトでも (大域オブジェクト環境設定群オブジェクト入口設定オブジェクトでも) 良さそうなものです。しかし document.domain に値が設定されると実効スクリプト起源が変化しますから、 それ以前に異なる大域オブジェクト由来の関数への参照を取得していれば、 異なる実効スクリプト起源を持つスクリプトを実行できることになります。 また document.domain 設定以後は異なる起源で同じ実効スクリプト起源スクリプトにアクセスできるようになります。 従って再帰的な関数呼び出しによって API の呼び出し元とみなすべき起源実効スクリプト起源は変化することがあるのです。

現在設定群オブジェクト

[119] 現在Realm記録 (current Realm Record) (現在Realm (current Realm) ) >>96 は現在実行中の関数オブジェクトRealm です。 JavaScript著者関数オブジェクトだけでなく、 プラットフォームオブジェクトでも定義されます。

[120] 現在設定群オブジェクト (current settings object) は、現在Realm環境設定群オブジェクトです >>96

[121] 現在大域オブジェクト (current global object) は、現在Realm大域オブジェクトです >>96

関連設定群オブジェクト

[122] 大域オブジェクト関連設定群オブジェクト (relevant settings object) は、 その大域オブジェクトと同時に作られた対応する環境設定群オブジェクトです。 >>96

[57] 大域オブジェクト以外のプラットフォームオブジェクト関連設定群オブジェクト (relevant settings object) は、 当該オブジェクト関連付けられた大域環境大域オブジェクト環境設定群オブジェクトです >>96

[124] プラットフォームオブジェクト関連大域オブジェクト (relevant global object) は、 その関連設定群オブジェクト大域オブジェクトです >>96

[123] プラットフォームオブジェクト関連Realm (relevant Realm) は、 その関連設定群オブジェクトRealmです >>96

[236] プラットフォームオブジェクト関連 (かんれん) エージェント (relevant agent) は、 その関連realmエージェントです。 >>235

要求のクライアント

[195] 要求は、クライアント (client) を持ちます。 値は null または環境設定群オブジェクトです。 >>192

[193] 要求は、予約クライアント (reserved client) を持ちます。 値は null環境環境設定群オブジェクトのいずれかです。 既定値は null です。 >>192

[194] navigation request では環境worker request (非 service worker request) では環境設定群オブジェクトとなり、 それ以外では使いません。 >>192

[196] 要求対象クライアントID (target client id) を持ちます。 値は文字列です。既定値は空文字列です。 >>192


[198] 要求は、 (window) を持ちます。 値は no-windowclient環境設定群オブジェクト (大域オブジェクトWindow のもの) のいずれかです。既定値は client です。 >>192

[199] client仕様書の規定の便宜のため設けられたもので、 fetch 中に no-window要求クライアントに変更されます。 >>192


[189] 要求参照元には、値として client を指定できます。参照元既定値client です。 >>188

[190] client は、要求クライアントから適当な参照元の値を決定するべきことを表しています。

[191] client は、 fetch の処理中に no-referrer または URL に置き換わります。 fetch 呼び出し元の仕様書参照元を明示せずとも fetch 側で適当な値で設定するために使われています。 >>188

サービスワーカークライアント

[205] サービスワーカークライアント (service worker client) は、 環境または環境設定群オブジェクトです >>203

[207] 窓クライアント (window client) は、 サービスワーカークライアントであって大域オブジェクトWindow のものです。 >>203

[208] 専用ワーカークライアント (dedicated worker client) は、 サービスワーカークライアントであって大域オブジェクトDedicatedWorkerGlobalScope のものです。 >>203

[210] 共有ワーカークライアント (shared worker client) は、 サービスワーカークライアントであって大域オブジェクトSharedWorkerGlobalScope のものです。 >>203

[211] ワーカークライアント (worker client) は、 専用ワーカークライアントまたは共有ワーカークライアントです。 >>203

[212] サービスワーカークライアントだけ意味が違うことに注意。 サービスワーカーワーカークライアントではありません。

[217] ServiceWorkerContainer は、 サービスワーカークライアント (service worker client) を持ちます >>216navigator オブジェクトServiceWorkerContainer オブジェクトの作成時に値が決まります。

[219] ジョブは、 クライアント (client) を持ちます >>218。初期値は null です >>218

関連

[20] スクリプトはその構成要素として環境設定群オブジェクトを1つ持っています。 これをスクリプトの関連する設定群オブジェクトといいます。

[52] 環境設定群オブジェクトと類する概念として他にクライアントRealm大域オブジェクトなどがありますが、各仕様からはそれらよりも環境設定群オブジェクトを参照する方が良いとされています >>51

[44] 環境設定群オブジェクト大域オブジェクトRealm には常に1:1:1対応関係があります。

歴史

現職設定群オブジェクト

[144] 当初は現職スクリプト (incumbent script) が規定されていましたが、 スクリプト設定群オブジェクトが新設されて現職設定群オブジェクトへと置き換えられました。

[145] Bug 18242 – Not clear what "script that invoked the method" means exactly in the case of e.g. a.setTimeout(b.postMessage, 0) // called from c ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=18242

[146] Rewrite script execution on top of ES · whatwg/html@4891d18 ( 版) https://github.com/whatwg/html/commit/4891d18aaf2df1d40aa61f467a5a10cfc19dd85d

[147] 26603 – Consider merging the concept of incumbent global with the current realm ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=26603

[148] 26603 – Consider merging the concept of incumbent global with the current realm ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=26603

[149] 24403 – WebIDL callbacks should probably default to pushing a new entry settings object ( ()) https://www.w3.org/Bugs/Public/show_bug.cgi?id=24403

[150] 26603 – Consider merging the concept of incumbent global with the current realm ( ()) https://www.w3.org/Bugs/Public/show_bug.cgi?id=26603

[151] 27204 – Provide guidance on entry vs incumbent settings objects ( ()) https://www.w3.org/Bugs/Public/show_bug.cgi?id=27204

[152] Merge pull request #128 from domenic/prepare-callbacks (bzbarsky著, ) https://github.com/heycam/webidl/commit/91ad860e5d80ee03ed558ec7724a618fb42dc2f2

[46] スクリプトの起源スクリプト設定群オブジェクト導入前は次のような規定でした。

所有者により決まる場合

[164] スクリプト起源所有子 (owner) 起源別名であり、 実効スクリプト起源所有子実効スクリプト起源別名です。 所有子スクリプトの種類により次の通り定まります。 >>135

script 要素
script 要素の所属する Document >>135
事象取扱器内容属性
属性の所属する Document >>135
他のスクリプトにより作られた関数その他のコード参照
作ったスクリプト >>135
HTTP リダイレクト (や他のプロトコルで等価なもの) により返された javascript URL
javascript: URLリダイレクトした URL >>135
属性にあった javascript URL
属性の所属する Document >>135
スタイル・シートにあった javascript URL
スタイル・シートURL >>135
閲覧文脈navigate 中の javascript URL であって、利用者によって提供されたもの (例えばブックマークレット)
閲覧文脈活性文書Document >>135
閲覧文脈navigate 中の javascript URL であって、マーク付けによって提供されたもの
URL を宣言している要素 (例えば a 要素) の Document >>135
閲覧文脈navigate 中の javascript URL であって、スクリプトによって提供されたもの
URL を提供したスクリプト >>135

その他のものから決まる場合

[223] その他の場合、スクリプト起源実効スクリプト起源は次に示すように定まります。

ワーカーで走っているスクリプト
ワーカーlocation 属性絶対URL起源 (通常はその URL 自体から決まる起源実効スクリプト起源であるが、 data URL構築子に指定されて作られたワーカーではその entry script起源実効スクリプト起源と同じ値となる (>>243)。) >>131

ワーカー起源

[249] ワーカー起源 (worker origin) は、 WorkerGlobalScope オブジェクトが作られるときに決まる起源です。 >>248 エントリー・スクリプト起源だったり、 SharedWorker 構築子の引数として指定された URL起源だったりします。 >>246 で導入されました。

[42] IRC logs: freenode / #whatwg / 20140416 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20140416

[283] IRC logs: freenode / #whatwg / 20141013 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20141013#l-519

改称

[48] 2014年10月にスクリプト設定群オブジェクトから環境設定群オブジェクトに改称されました >>47

[286] Service workers, dedicated workers, and the environment settings object ( (Anne van Kesteren 著, 版)) http://lists.w3.org/Archives/Public/public-webappsec/2014Oct/0120.html

[287] Service workers, dedicated workers, and the environment settings object ( (Anne van Kesteren 著, 版)) http://lists.w3.org/Archives/Public/public-webappsec/2014Oct/0120.html

[288] MIX: Convert checks to environment settings objects. · d065309 · w3c/webappsec ( ( 版)) https://github.com/w3c/webappsec/commit/d06530978dafbd99881ca74f93ed67d720b161da

[289] Web Applications 1.0 r8860 Used the wrong variable in the worker's environment settings objects ( ( 版)) https://html5.org/r/8860

[63] Close #123: add creation URL to environment settings objects · whatwg/html@9d4276a ( 版) https://github.com/whatwg/html/commit/9d4276a62d0191b98f6bceaf9e0451e478ae8b47

[64] SECURE: Use the new 'creation URL' concept to resolve some issues. · w3c/webappsec@43adcd0 ( 版) https://github.com/w3c/webappsec/commit/43adcd079327dd0258f5f250538bffca8579a7df

[66] Integrate Fetch into HTML · whatwg/html@7c5555a ( 版) https://github.com/whatwg/html/commit/7c5555a16f2920c02244c10756bb2f1a11e87a22

[67] Add 'HTTPS state' to settings objects · whatwg/html@6de5241 ( 版) https://github.com/whatwg/html/commit/6de524157fcf341e10efb3eec634bcf7325e6ee4

[68] Environment settings objects vs global objects (Anne van Kesteren 著, 版) https://lists.w3.org/Archives/Public/www-archive/2015Sep/0020.html

[28] Move 'HTTPS state' from Window to Document · whatwg/html@68390ce ( 版) https://github.com/whatwg/html/commit/68390cea99f9f19881a16e1c8adaf1b130b4d1cc

[109] Issue 360891 - chromium - Javascript run via V8 Microtask callback has no "entered" DOM Window - An open-source project to help move the web forward. - Google Project Hosting ( ( 版)) https://code.google.com/p/chromium/issues/detail?id=360891

[110] Rewrite script execution on top of ES · whatwg/html@4891d18 ( 版) https://github.com/whatwg/html/commit/4891d18aaf2df1d40aa61f467a5a10cfc19dd85d

[111] Formalize [[Realm]] internal slot of ordinary objects · Issue #573 · tc39/ecma262 ( ()) https://github.com/tc39/ecma262/issues/573

[112] 27203 – Evaluate entry settings object usage ( ()) https://www.w3.org/Bugs/Public/show_bug.cgi?id=27203

[113] 27204 – Provide guidance on entry vs incumbent settings objects ( ()) https://www.w3.org/Bugs/Public/show_bug.cgi?id=27204

[72] Rewrite script execution on top of ES · whatwg/html@4891d18 ( 版) https://github.com/whatwg/html/commit/4891d18aaf2df1d40aa61f467a5a10cfc19dd85d

[37] Initialize a window variable before using it · whatwg/html@862c8b1 ( 版) https://github.com/whatwg/html/commit/862c8b1bff2a62c0eb471ff636676a044eeef6ec

[55] Add <script type="module"> and module resolution/fetching/evaluation · whatwg/html@cd1a9fb ( 版) https://github.com/whatwg/html/commit/cd1a9fb1e83f7d0bc30be8b34ecdaf444a0b19a4

[56] Fix #47: not all settings objects have a responsible document anymore · whatwg/xhr@cc15c94 ( 版) https://github.com/whatwg/xhr/commit/cc15c9443f774264cb32d33a13be3a8b58314867

[58] Define "relevant settings object" for any platform object · whatwg/html@25eaf88 ( 版) https://github.com/whatwg/html/commit/25eaf8811be45dd40f961e7a5f111a4ad1e8fcee

[43] Clarify settings object, realm, and global relationships · whatwg/html@0866f1b ( 版) https://github.com/whatwg/html/commit/0866f1b3f4b4ea5a99a30909e9bbe557dea0b460

[77] Move module map to Document/WorkerGlobalScope · whatwg/html@9a889fe ( 版) https://github.com/whatwg/html/commit/9a889fee2ecb106974fb48fa50491edd77047954

[79] 27143 – There's no reason to set a "responsible browsing context" since it is never used. Not having it for [...] ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=27143

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

[32] Integrate with the Referrer Policy spec, part 2 of n ( (domenic著, )) https://github.com/whatwg/html/commit/176e74243c649b709b9959b7d08b327290c2f403

[81] Integrate with HTML, part 2 of n (#49) ( (domenic著, )) https://github.com/w3c/webappsec-referrer-policy/commit/df68c16003b7f89bbaafe44d8756720889f9d64a

[82] 25300 – WebIDL needs to be updated to new terminology around script settings objects ( ()) https://www.w3.org/Bugs/Public/show_bug.cgi?id=25300

[83] [worklets] First pass of fixing import for worklets. by bfgeek · Pull Request #251 · w3c/css-houdini-drafts () https://github.com/w3c/css-houdini-drafts/pull/251

[84] s/incumbent/current/ settings object. Closes w3c/webappsec-secure-con… (mikewest著, ) https://github.com/w3c/webappsec-secure-contexts/commit/d153c48422ef5d94e902d1f73fadd72ff10761b6

[85] Use current instead of incumbent + entry in worker constructors (domenic著, ) https://github.com/whatwg/html/commit/485c76a84611d094839b3b60d13e6e997594800b

[86] Use the Window's associated Document for allow-modals sandbox checks (domenic著, ) https://github.com/whatwg/html/commit/29ebd5b6e8c4ba4006115a784c5c6c87dc151489

[87] Use current settings object in content document definition (domenic著, ) https://github.com/whatwg/html/commit/a6a1b714d2b3288fbf88528ac9182f9263b92bc8

[88] Use relevant settings object in protocol handlers (domenic著, ) https://github.com/whatwg/html/commit/413c1ccc43c9b16ff5c73585092f8721dea305c7

[89] Use the associated document for pushState/replaceState's origin check (domenic著, ) https://github.com/whatwg/html/commit/60f84adcae2d252fc63afa6b65686a4590d28734

[90] Use the associated document for pushState/replaceState's origin check (domenic著, ) https://github.com/whatwg/html/commit/60f84adcae2d252fc63afa6b65686a4590d28734

[91] Use "current settings object" in the frameElement origin check (domenic著, ) https://github.com/whatwg/html/commit/921499fbc6d84424ebf569fe58ad82dabc9b59a0

[92] Link to CSP3, minor cleanup of settings/global object references. (mikewest著, ) https://github.com/w3c/webappsec-mixed-content/commit/416eb026dc24f6dadb4daf77eeb90c6fd8b7266a

[93] Use only the incumbent global in postMessage (domenic著, ) https://github.com/whatwg/html/commit/8259a69aab7538b772beebad1ff69dca44b159ab

[94] Add a new section detailing the various potential realms (domenic著, ) https://github.com/whatwg/html/commit/6399af334edd6000bd394685923df5f0519194ab

[95] Fix incumbent settings object definition and add examples (domenic著, ) https://github.com/whatwg/html/commit/f97c3e478654114bd4c9cc8587418a5519f9eb09

[166] Stop usage of entry settings object (annevk著, ) https://github.com/whatwg/fetch/commit/24db2d37e4d952343ce5319a1684cbd0319e144e

[167] Set referrer policy better for <iframe srcdoc> documents (domenic著, ) https://github.com/whatwg/html/commit/5d7c532fc9aa275bd3b12d469b9841c0bad4f50d

[172] Update advice to favor the relevant realm over the current one (domenic著, ) https://github.com/whatwg/html/commit/488e201ebf67ab0246eecdc711edc1188e2eef5a

[176] Convert usages to current settings object (mark a. foltz著, ) https://github.com/w3c/presentation-api/commit/8858a12c048ea5967c527e1eacefabb64293a2eb

[177] Revert "Convert usages to current settings object" (mark a. foltz著, ) https://github.com/w3c/presentation-api/commit/c430cf78e610931fb10623671dafc918f7096e05

[178] Use current settings object in steps that require a settings object. by mfoltzgoogle · Pull Request #357 · w3c/presentation-api () https://github.com/w3c/presentation-api/pull/357

[179] Define how data URLs affect workers (annevk著, ) https://github.com/whatwg/html/commit/c592f62985ab9aa0e26c111a9823de5101d58c96

[180] Improve navigate for service worker hooks (jungkees著, ) https://github.com/whatwg/html/commit/2b93f9ec35b152e58d3e181bea8c45d789bac949

[183] Add environment's execution ready flag (jungkees著, ) https://github.com/whatwg/html/commit/d358c7814de8a053dcb8615a5d87e8c2e0e19257

[184] Use current global object for ServiceWorkerGlobalScope check (annevk著, ) https://github.com/whatwg/notifications/commit/434ccaf63410f5fe71e7dd75a69bb9dee953079b

[185] Honor srcdoc document referrer policies when set (estark37著, ) https://github.com/whatwg/html/commit/3147414111d134ecd844d9796aa6fc7c1979c98b

[186] Editorial: convert to Bikeshed (annevk著, ) https://github.com/whatwg/xhr/commit/83a4d706c12c219392c015b5c48ca55847af7056

[187] Stop using incumbent settings object (#67) (domenic著, ) https://github.com/w3c/FileAPI/commit/1a6f054ec9ade529863b7852e272c3c39710b867

[213] Fix event callback invocation to set entry/incumbent correctly (domenic著, ) https://github.com/whatwg/html/commit/037f35d4a114d5543d5caa17689cbe1b095790cf

[220] [worklets] Fixes the setup of the inside setttings object for worklet… (bfgeek著, ) https://github.com/w3c/css-houdini-drafts/commit/7481964e1d2e9dfc3b241d9c6a58bf478bae6f88

[221] Simplify the definition of the "entry" concept (domenic著, ) https://github.com/whatwg/html/commit/36d771a0c90c3534fe0d4c6a23ca240979b94dfd

[224] Editorial: clarify the type of creation URL (jungkees著, ) https://github.com/whatwg/html/commit/064b2f27128e222fcd33ab85d199a450a877ad20

[225] Editorial: rename browsing context environment settings object (annevk著, ) https://github.com/whatwg/html/commit/3d38e20331de04af0d82e2a758d79d6fe51d596a

[226] Fix #253: Stop using incumbent settings object (anssiko著, ) https://github.com/w3c/sensors/commit/f15d394bd203747b931e884a54a4b889641d34de

[227] Stop using "incumbent settings object"? · Issue #253 · w3c/sensors () https://github.com/w3c/sensors/issues/253

[228] Fix #253: Stop using incumbent settings object by anssiko · Pull Request #258 · w3c/sensors () https://github.com/w3c/sensors/pull/258

[229] Remove the blanket restriction against nested usage. (#114) (mikewest著, ) https://github.com/w3c/webappsec-credential-management/commit/c3c4a919defe3a96691049de5ad508c7d5cf45e8

[230] Use the API URL character encoding for XMLHttpRequest (annevk著, ) https://github.com/whatwg/xhr/commit/6f14c60f5ae81381c12ff50f5f6898a1583b570d

[233] Discard the environment after a failed navigation or worker start. by mattto · Pull Request #3723 · whatwg/html () https://github.com/whatwg/html/pull/3723

[234] Clients.get: block on reserved clients. by mattto · Pull Request #1315 · w3c/ServiceWorker () https://github.com/w3c/ServiceWorker/pull/1315

[237] Editorial: clarify responsible browsing context (annevk, , ) https://github.com/whatwg/html/commit/f262b1961c017769e03f3113eeead89a81ccdf9e

[238] What happens to the responsible browsing context of a settings object when the browsing context is discarded? · Issue #3846 · whatwg/html () https://github.com/whatwg/html/issues/3846

[239] Editorial: clarify responsible browsing context by annevk · Pull Request #4393 · whatwg/html () https://github.com/whatwg/html/pull/4393

[240] Responsible browsing context of an environment settings object seems fishy · Issue #1580 · whatwg/html () https://github.com/whatwg/html/issues/1580

[241] Editorial: nested browsing context is a member, not a type (annevk, , ) https://github.com/whatwg/html/commit/6b737bbc428facf34ec3728c0912cf9e172d0ea4