/
796.txt
38 lines (26 loc) · 1.83 KB
/
796.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
* 仕様書
[REFS[
- [1] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2015-12-22 10:28:15 +09:00]] 版) <https://html.spec.whatwg.org/#realm-execution-context>
]REFS]
* 状態
[5] [[実行文脈]]は次の[[状態]]を持ちます。
[FIG(list members)[
: [F[[CODE[[[Realm]]]]]] :
: [F[[CODE[[[ScriptOrModule]]]] :
: [F[[[大域オブジェクト]]]] : [F[[CODE[[[Realm]]]]]] の [CODE[[F(ss)[[[globalObject]]]]]]。
: [F[[[設定群オブジェクト]]]] :
]FIG]
* [F[realm 実行文脈]] (環境設定群オブジェクト)
[2] [[環境設定群オブジェクト]]の [DFN[[F[[RUBYB[[[realm実行文脈]]]@en[realm execution context]]]]]]は、
当該[[環境設定群オブジェクト]]を使うすべての[[スクリプト]] (= ある [[realm]]
中のすべての[[スクリプト]]) で共有する[[JavaScript実行文脈]]です。 [SRC[>>1]]
[3] [[古典スクリプトの実行]]や[[モジュールスクリプトの実行]]の時に、
本[[実行文脈]]が [[JavaScript実行文脈スタック]]の上に積まれます。
[[スクリプト]]ごとの特有の[[実行文脈]]は更にその上に積まれます。
(なので [CODE[[[ParseScript]]]] や [CODE[[[EvaluateScript]]]] がどの [CODE[[[Realm]]]]
を使うべきか決められます。) [SRC[>>1]]
* [F[走っている JavaScript 実行文脈]]
[6] [[走っている実行文脈に対応するスクリプト]]
* 歴史
[4] [CITE@en[Rewrite script execution on top of ES · whatwg/html@4891d18]] ([TIME[2015-12-22 21:04:34 +09:00]] 版) <https://github.com/whatwg/html/commit/4891d18aaf2df1d40aa61f467a5a10cfc19dd85d>
[7] [CITE@en[Add <script type="module"> and module resolution/fetching/evaluation · whatwg/html@cd1a9fb]] ([TIME[2016-01-21 23:18:53 +09:00]] 版) <https://github.com/whatwg/html/commit/cd1a9fb1e83f7d0bc30be8b34ecdaf444a0b19a4>