forked from tc39/proposal-shadowrealm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
333 lines (257 loc) · 66.4 KB
/
index.html
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
<!doctype html>
<head><meta charset="utf-8">
<link href="ecmarkup.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
<script src="ecmarkup.js"></script>
<title>ECMAScript Realms Spec Proposal</title><script type="application/json" id="menu-search-biblio">[{"type":"table","id":"table-1","number":1,"caption":"Table 1: Well-known Intrinsic Objects","referencingIds":[],"namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","key":"Table 1: Well-known Intrinsic Objects"},{"type":"table","id":"table-21","number":2,"caption":"Table 2: Realm Record Fields","referencingIds":[],"namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","key":"Table 2: Realm Record Fields"},{"type":"op","aoid":"InvokeIsDirectEvalHook","refId":"sec-invokeisdirectevalhook","location":"","referencingIds":[],"key":"InvokeIsDirectEvalHook"},{"type":"clause","id":"sec-invokeisdirectevalhook","aoid":"InvokeIsDirectEvalHook","title":"InvokeIsDirectEvalHook(realmRec, func)","titleHTML":"InvokeIsDirectEvalHook(<var>realmRec</var>, <var>func</var>)","number":"1.1","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":["_ref_36"],"key":"InvokeIsDirectEvalHook(realmRec, func)"},{"type":"op","aoid":"InvokeDirectEvalHook","refId":"sec-invokedirectevalhook","location":"","referencingIds":[],"key":"InvokeDirectEvalHook"},{"type":"clause","id":"sec-invokedirectevalhook","aoid":"InvokeDirectEvalHook","title":"InvokeDirectEvalHook ( realmRec, x )","titleHTML":"InvokeDirectEvalHook ( <var>realmRec</var>, <var>x</var> )","number":"1.2","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":["_ref_32"],"key":"InvokeDirectEvalHook ( realmRec, x )"},{"type":"op","aoid":"InvokeImportHook","refId":"sec-invokeimporthook","location":"","referencingIds":[],"key":"InvokeImportHook"},{"type":"clause","id":"sec-invokeimporthook","aoid":"InvokeImportHook","title":"InvokeImportHook ( realmRec, referencingScriptOrModule, specifierString, promiseCapability )","titleHTML":"InvokeImportHook ( <var>realmRec</var>, <var>referencingScriptOrModule</var>, <var>specifierString</var>, <var>promiseCapability</var> )","number":"1.3","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":["_ref_46"],"key":"InvokeImportHook ( realmRec, referencingScriptOrModule, specifierString, promiseCapability )"},{"type":"clause","id":"sec-code-realms","aoid":null,"title":"Realms","titleHTML":"Realms","number":"1","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"Realms"},{"type":"op","aoid":"ParseModule","refId":"sec-parsemodule","location":"","referencingIds":[],"key":"ParseModule"},{"type":"clause","id":"sec-parsemodule","aoid":"ParseModule","title":"ParseModule ( sourceText, realm, hostDefined )","titleHTML":"ParseModule ( <var>sourceText</var>, <var>realm</var>, <var>hostDefined</var> )","number":"2","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"ParseModule ( sourceText, realm, hostDefined )"},{"type":"op","aoid":"ResolveModule","refId":"sec-resolvemodule","location":"","referencingIds":[],"key":"ResolveModule"},{"type":"clause","id":"sec-resolvemodule","aoid":"ResolveModule","title":"ResolveModule ( referencingModule, specifier )","titleHTML":"ResolveModule ( <var>referencingModule</var>, <var>specifier</var> )","number":"3","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":["_ref_20","_ref_22","_ref_25","_ref_27","_ref_29","_ref_31"],"key":"ResolveModule ( referencingModule, specifier )"},{"type":"clause","id":"sec-moduleevaluation","aoid":null,"title":"ModuleEvaluation( ) Concrete Method","titleHTML":"ModuleEvaluation( ) Concrete Method","number":"4","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"ModuleEvaluation( ) Concrete Method"},{"type":"clause","id":"sec-getexportednames","aoid":null,"title":"GetExportedNames( exportStarSet ) Concrete Method","titleHTML":"GetExportedNames( <var>exportStarSet</var> ) Concrete Method","number":"5","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"GetExportedNames( exportStarSet ) Concrete Method"},{"type":"clause","id":"sec-resolveexport","aoid":null,"title":"ResolveExport( exportName, resolveSet ) Concrete Method","titleHTML":"ResolveExport( <var>exportName</var>, <var>resolveSet</var> ) Concrete Method","number":"6","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"ResolveExport( exportName, resolveSet ) Concrete Method"},{"type":"clause","id":"sec-moduledeclarationinstantiation","aoid":null,"title":"ModuleDeclarationInstantiation( ) Concrete Method","titleHTML":"ModuleDeclarationInstantiation( ) Concrete Method","number":"7","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"ModuleDeclarationInstantiation( ) Concrete Method"},{"type":"op","aoid":"PerformEval","refId":"sec-performeval","location":"","referencingIds":[],"key":"PerformEval"},{"type":"clause","id":"sec-performeval","aoid":"PerformEval","title":"Runtime Semantics: PerformEval( x, evalRealm, strictCaller, direct )","titleHTML":"Runtime Semantics: PerformEval( <var>x</var>, <var>evalRealm</var>, <var>strictCaller</var>, <var>direct</var> )","number":"8","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":["_ref_39","_ref_77"],"key":"Runtime Semantics: PerformEval( x, evalRealm, strictCaller, direct )"},{"type":"production","id":"prod-CallExpression","name":"CallExpression","referencingIds":["_ref_93"],"namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","key":"CallExpression"},{"type":"clause","id":"sec-function-calls-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"9","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":["_ref_3"],"key":"Runtime Semantics: Evaluation"},{"type":"production","id":"prod-ImportCall","name":"ImportCall","referencingIds":[],"namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","key":"ImportCall"},{"type":"clause","id":"sec-import-call-runtime-semantics-evaluation","aoid":null,"title":"Runtime Semantics: Evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"10","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"Runtime Semantics: Evaluation"},{"type":"clause","id":"sec-create-realm-rec","aoid":null,"title":"CreateRealmRec ( intrinsics )","titleHTML":"CreateRealmRec ( <var>intrinsics</var> )","number":"11.1.1","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"CreateRealmRec ( intrinsics )"},{"type":"clause","id":"sec-realm-abstract-operations","aoid":null,"title":"Realm Abstract Operations","titleHTML":"Realm Abstract Operations","number":"11.1","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"Realm Abstract Operations"},{"type":"clause","id":"sec-realm-default-import-hook-functions","aoid":null,"title":"Realm Default Import Hook Functions","titleHTML":"Realm Default Import Hook Functions","number":"11.2.1","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":["_ref_0"],"key":"Realm Default Import Hook Functions"},{"type":"clause","id":"sec-realm-built-in-function-objects","aoid":null,"title":"Built-in Function Objects","titleHTML":"Built-in Function Objects","number":"11.2","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"Built-in Function Objects"},{"type":"op","aoid":"Realm","refId":"sec-realm","location":"","referencingIds":[],"key":"Realm"},{"type":"clause","id":"sec-realm","aoid":"Realm","title":"Realm ([ options ])","titleHTML":"Realm ([ <var>options</var> ])","number":"11.3.1","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":["_ref_2","_ref_45","_ref_48","_ref_49","_ref_50","_ref_51","_ref_52","_ref_53","_ref_54","_ref_55","_ref_88","_ref_89","_ref_90","_ref_91","_ref_92"],"key":"Realm ([ options ])"},{"type":"clause","id":"sec-the-realm-constructor","aoid":null,"title":"The Realm Constructor","titleHTML":"The Realm Constructor","number":"11.3","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"The Realm Constructor"},{"type":"clause","id":"sec-properties-of-the-realm-constructor","aoid":null,"title":"Properties of the Realm Constructor","titleHTML":"Properties of the Realm Constructor","number":"11.4","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"Properties of the Realm Constructor"},{"type":"clause","id":"sec-realm.prototype.init","aoid":null,"title":"Realm.prototype.init ()","titleHTML":"Realm.prototype.init ()","number":"11.5.1","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"Realm.prototype.init ()"},{"type":"clause","id":"sec-realm.prototype.eval","aoid":null,"title":"Realm.prototype.eval ( x )","titleHTML":"Realm.prototype.eval ( <var>x</var> )","number":"11.5.2","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"Realm.prototype.eval ( x )"},{"type":"clause","id":"sec-realm.prototype.global","aoid":null,"title":"get Realm.prototype.global","titleHTML":"get Realm.prototype.global","number":"11.5.3","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"get Realm.prototype.global"},{"type":"clause","id":"sec-realm.prototype.thisValue","aoid":null,"title":"get Realm.prototype.thisValue","titleHTML":"get Realm.prototype.thisValue","number":"11.5.4","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"get Realm.prototype.thisValue"},{"type":"clause","id":"sec-realm.prototype.stdlib","aoid":null,"title":"get Realm.prototype.stdlib","titleHTML":"get Realm.prototype.stdlib","number":"11.5.5","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"get Realm.prototype.stdlib"},{"type":"clause","id":"sec-realm.prototype.intrinsics","aoid":null,"title":"get Realm.prototype.intrinsics","titleHTML":"get Realm.prototype.intrinsics","number":"11.5.6","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"get Realm.prototype.intrinsics"},{"type":"clause","id":"sec-realm.prototype-@@tostringtag","aoid":null,"title":"Realm.prototype [ @@toStringTag ]","titleHTML":"Realm.prototype [ @@toStringTag ]","number":"11.5.7","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"Realm.prototype [ @@toStringTag ]"},{"type":"clause","id":"sec-properties-of-the-realm-prototype-object","aoid":null,"title":"Properties of the Realm Prototype Object","titleHTML":"Properties of the Realm Prototype Object","number":"11.5","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"Properties of the Realm Prototype Object"},{"type":"table","id":"table-3","number":3,"caption":"Table 3: Internal Slots of Realm Instances","referencingIds":["_ref_1"],"namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","key":"Table 3: Internal Slots of Realm Instances"},{"type":"clause","id":"sec-properties-of-realm-instances","aoid":null,"title":"Properties of Realm Instances","titleHTML":"Properties of Realm Instances","number":"11.6","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"Properties of Realm Instances"},{"type":"clause","id":"sec-realm-objects","aoid":null,"title":"Realm Objects","titleHTML":"Realm Objects","number":"11","namespace":"https://rawgit.com/caridy/proposal-realms/master/index.html","location":"","referencingIds":[],"key":"Realm Objects"}]</script></head><body><div id="menu-toggle">☰</div><div id="menu-spacer"></div><div id="menu"><div id="menu-search"><input type="text" id="menu-search-box" placeholder="Search..."><div id="menu-search-results" class="inactive"></div></div><div id="menu-pins"><div class="menu-pane-header">Pins</div><ul id="menu-pins-list"></ul></div><div class="menu-pane-header">Table of Contents</div><div id="menu-toc"><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-code-realms" title="Realms"><span class="secnum">1</span> Realms</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-invokeisdirectevalhook" title="InvokeIsDirectEvalHook(realmRec, func)"><span class="secnum">1.1</span> InvokeIsDirectEvalHook(<var>realmRec</var>, <var>func</var>)</a></li><li><span class="item-toggle-none"></span><a href="#sec-invokedirectevalhook" title="InvokeDirectEvalHook ( realmRec, x )"><span class="secnum">1.2</span> InvokeDirectEvalHook ( <var>realmRec</var>, <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-invokeimporthook" title="InvokeImportHook ( realmRec, referencingScriptOrModule, specifierString, promiseCapability )"><span class="secnum">1.3</span> InvokeImportHook ( <var>realmRec</var>, <var>referencingScriptOrModule</var>, <var>specifierString</var>, <var>promiseCapability</var> )</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-parsemodule" title="ParseModule ( sourceText, realm, hostDefined )"><span class="secnum">2</span> ParseModule ( <var>sourceText</var>, <var>realm</var>, <var>hostDefined</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-resolvemodule" title="ResolveModule ( referencingModule, specifier )"><span class="secnum">3</span> ResolveModule ( <var>referencingModule</var>, <var>specifier</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-moduleevaluation" title="ModuleEvaluation( ) Concrete Method"><span class="secnum">4</span> ModuleEvaluation( ) Concrete Method</a></li><li><span class="item-toggle-none"></span><a href="#sec-getexportednames" title="GetExportedNames( exportStarSet ) Concrete Method"><span class="secnum">5</span> GetExportedNames( <var>exportStarSet</var> ) Concrete Method</a></li><li><span class="item-toggle-none"></span><a href="#sec-resolveexport" title="ResolveExport( exportName, resolveSet ) Concrete Method"><span class="secnum">6</span> ResolveExport( <var>exportName</var>, <var>resolveSet</var> ) Concrete Method</a></li><li><span class="item-toggle-none"></span><a href="#sec-moduledeclarationinstantiation" title="ModuleDeclarationInstantiation( ) Concrete Method"><span class="secnum">7</span> ModuleDeclarationInstantiation( ) Concrete Method</a></li><li><span class="item-toggle-none"></span><a href="#sec-performeval" title="Runtime Semantics: PerformEval( x, evalRealm, strictCaller, direct )"><span class="secnum">8</span> RS: PerformEval( <var>x</var>, <var>evalRealm</var>, <var>strictCaller</var>, <var>direct</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-function-calls-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">9</span> RS: Evaluation</a></li><li><span class="item-toggle-none"></span><a href="#sec-import-call-runtime-semantics-evaluation" title="Runtime Semantics: Evaluation"><span class="secnum">10</span> RS: Evaluation</a></li><li><span class="item-toggle">◢</span><a href="#sec-realm-objects" title="Realm Objects"><span class="secnum">11</span> Realm Objects</a><ol class="toc"><li><span class="item-toggle">◢</span><a href="#sec-realm-abstract-operations" title="Realm Abstract Operations"><span class="secnum">11.1</span> Realm Abstract Operations</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-create-realm-rec" title="CreateRealmRec ( intrinsics )"><span class="secnum">11.1.1</span> CreateRealmRec ( <var>intrinsics</var> )</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-realm-built-in-function-objects" title="Built-in Function Objects"><span class="secnum">11.2</span> Built-in Function Objects</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-realm-default-import-hook-functions" title="Realm Default Import Hook Functions"><span class="secnum">11.2.1</span> Realm Default Import Hook Functions</a></li></ol></li><li><span class="item-toggle">◢</span><a href="#sec-the-realm-constructor" title="The Realm Constructor"><span class="secnum">11.3</span> The Realm Constructor</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-realm" title="Realm ([ options ])"><span class="secnum">11.3.1</span> Realm ([ <var>options</var> ])</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-the-realm-constructor" title="Properties of the Realm Constructor"><span class="secnum">11.4</span> Properties of the Realm Constructor</a></li><li><span class="item-toggle">◢</span><a href="#sec-properties-of-the-realm-prototype-object" title="Properties of the Realm Prototype Object"><span class="secnum">11.5</span> Properties of the Realm Prototype Object</a><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-realm.prototype.init" title="Realm.prototype.init ()"><span class="secnum">11.5.1</span> Realm.prototype.init ()</a></li><li><span class="item-toggle-none"></span><a href="#sec-realm.prototype.eval" title="Realm.prototype.eval ( x )"><span class="secnum">11.5.2</span> Realm.prototype.eval ( <var>x</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-realm.prototype.global" title="get Realm.prototype.global"><span class="secnum">11.5.3</span> get Realm.prototype.global</a></li><li><span class="item-toggle-none"></span><a href="#sec-realm.prototype.thisValue" title="get Realm.prototype.thisValue"><span class="secnum">11.5.4</span> get Realm.prototype.thisValue</a></li><li><span class="item-toggle-none"></span><a href="#sec-realm.prototype.stdlib" title="get Realm.prototype.stdlib"><span class="secnum">11.5.5</span> get Realm.prototype.stdlib</a></li><li><span class="item-toggle-none"></span><a href="#sec-realm.prototype.intrinsics" title="get Realm.prototype.intrinsics"><span class="secnum">11.5.6</span> get Realm.prototype.intrinsics</a></li><li><span class="item-toggle-none"></span><a href="#sec-realm.prototype-@@tostringtag" title="Realm.prototype [ @@toStringTag ]"><span class="secnum">11.5.7</span> Realm.prototype [ @@toStringTag ]</a></li></ol></li><li><span class="item-toggle-none"></span><a href="#sec-properties-of-realm-instances" title="Properties of Realm Instances"><span class="secnum">11.6</span> Properties of Realm Instances</a></li></ol></li></ol></div></div><div id="spec-container"><h1 class="title first">ECMAScript Realms Spec Proposal</h1>
<emu-table id="table-1" caption="Well-known Intrinsic Objects"><figure><figcaption>Table 1: Well-known Intrinsic Objects</figcaption>
<table>
<tbody>
<tr>
<th>Intrinsic Name</th>
<th>Global Name</th>
<th>ECMAScript Language Association</th>
</tr>
<tr>
<td>%<emu-xref aoid="Realm" id="_ref_2"><a href="#sec-realm">Realm</a></emu-xref>%</td>
<td><code>Realm</code></td>
<td>…</td>
</tr>
<tr>
<td>%RealmPrototype%</td>
<td><code>Realm.prototype</code></td>
<td>…</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<!-- es6num="8.2" -->
<emu-clause id="sec-code-realms">
<h1><span class="secnum">1</span>Realms</h1>
<emu-table id="table-21" caption="Realm Record Fields"><figure><figcaption>Table 2: <emu-xref href="#realm-record"><a href="https://tc39.github.io/ecma262/#realm-record">Realm Record</a></emu-xref> Fields</figcaption>
<table>
<tbody>
<tr>
<th>Field Name</th>
<th>Value</th>
<th>Meaning</th>
</tr>
<tr>
<td>[[HostDefined]]</td>
<td>...</td>
<td>...</td>
</tr>
<tr>
<td>[[EvalHook]]</td>
<td>A function object or <emu-val>undefined</emu-val></td>
<td>The function that is used as the eval hook. If [[EvalHook]] is undefined, the hook invoker will carry on the default behavior.</td>
</tr>
<tr>
<td>[[IsDirectEvalHook]]</td>
<td>A function object or <emu-val>undefined</emu-val></td>
<td>The function that is used as the <emu-xref href="#sec-function-calls-runtime-semantics-evaluation" id="_ref_3"><a href="#sec-function-calls-runtime-semantics-evaluation">direct eval</a></emu-xref> check hook. If [[IsDirectEvalHook]] is undefined, the hook invoker will carry on the default behavior.</td>
</tr>
<tr>
<td>[[ImportHook]]</td>
<td>A function object or <emu-val>undefined</emu-val></td>
<td>The function that is used as the import hook. If [[ImportHook]] is undefined, the hook invoker will carry on the default behavior.</td>
</tr>
<tr>
<td>[[ImportMetaHook]]</td>
<td>A function object or <emu-val>undefined</emu-val></td>
<td>The function that is used as the import.meta hook. If [[ImportMetaHook]] is undefined, the hook invoker will carry on the default behavior.</td>
</tr>
</tbody>
</table>
</figure></emu-table>
<emu-clause id="sec-invokeisdirectevalhook" aoid="InvokeIsDirectEvalHook">
<h1><span class="secnum">1.1</span>InvokeIsDirectEvalHook(<var>realmRec</var>, <var>func</var>)</h1>
<p>The abstract operation InvokeIsDirectEvalHook with arguments <var>realmRec</var> and <var>func</var> performs the following steps:</p>
<emu-alg><ol><li>Assert: realm is a <emu-xref href="#realm-record"><a href="https://tc39.github.io/ecma262/#realm-record">Realm Record</a></emu-xref>.</li><li>Let <var>fn</var> be <var>realmRec</var>.[[IsDirectEvalHook]].</li><li>If <var>fn</var> is <emu-val>undefined</emu-val>, return <emu-xref aoid="SameValue" id="_ref_4"><a href="https://tc39.github.io/ecma262/#sec-samevalue">SameValue</a></emu-xref>(<var>func</var>, <emu-xref href="#sec-eval-x"><a href="https://tc39.github.io/ecma262/#sec-eval-x">%eval%</a></emu-xref>).</li><li>Assert: <emu-xref aoid="IsCallable" id="_ref_5"><a href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>fn</var>) is <emu-val>true</emu-val>.</li><li>Let <var>result</var> be <emu-xref aoid="ToBoolean" id="_ref_6"><a href="https://tc39.github.io/ecma262/#sec-toboolean">ToBoolean</a></emu-xref>( ? <emu-xref aoid="Call" id="_ref_7"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<var>fn</var>, <emu-val>undefined</emu-val>, « <var>func</var> »)).</li><li>Return <var>result</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-invokedirectevalhook" aoid="InvokeDirectEvalHook">
<h1><span class="secnum">1.2</span>InvokeDirectEvalHook ( <var>realmRec</var>, <var>x</var> )</h1>
<p>The abstract operation InvokeDirectEvalHook with arguments <var>realmRec</var> and <var>x</var> performs the following steps:</p>
<emu-alg><ol><li>Assert: realm is a <emu-xref href="#realm-record"><a href="https://tc39.github.io/ecma262/#realm-record">Realm Record</a></emu-xref>.</li><li>Let <var>fn</var> be <var>realmRec</var>.[[EvalHook]].</li><li>If <var>fn</var> is <emu-val>undefined</emu-val>, return <var>x</var>.</li><li>Assert: <emu-xref aoid="IsCallable" id="_ref_8"><a href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>fn</var>) is <emu-val>true</emu-val>.</li><li>Return ? <emu-xref aoid="Call" id="_ref_9"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<var>fn</var>, <emu-val>undefined</emu-val>, « <var>x</var> »).
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-invokeimporthook" aoid="InvokeImportHook">
<h1><span class="secnum">1.3</span>InvokeImportHook ( <var>realmRec</var>, <var>referencingScriptOrModule</var>, <var>specifierString</var>, <var>promiseCapability</var> )</h1>
<p>The abstract operation InvokeImportHook with arguments <var>realmRec</var>, <var>referencingScriptOrModule</var>, <var>specifier</var> and <var>promiseCapability</var> performs the following steps:</p>
<emu-alg><ol><li>Assert: <var>realmRec</var> is a <emu-xref href="#realm-record"><a href="https://tc39.github.io/ecma262/#realm-record">Realm Record</a></emu-xref>.</li><li>Assert: <emu-xref aoid="Type" id="_ref_10"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>specifierString</var>) is String.</li><li>Assert: <var>referencingScriptOrModule</var> is a <emu-xref href="#script-record"><a href="https://tc39.github.io/ecma262/#script-record">Script Record</a></emu-xref> or <emu-xref href="#sec-abstract-module-records"><a href="https://tc39.github.io/ecma262/#sec-abstract-module-records">Module Record</a></emu-xref> (i.e. is not null).</li><li>Assert: <var>resultCapability</var> is a PromiseCapability <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref>.</li><li>Let <var>fn</var> be <var>realmRec</var>.[[ImportHook]].</li><li>If <var>fn</var> is <emu-val>undefined</emu-val>, then<ol><li>Perform ! HostImportModuleDynamically(<var>referencingScriptOrModule</var>, <var>specifierString</var>, <var>promiseCapability</var>).</li></ol></li><li>Assert: <emu-xref aoid="IsCallable" id="_ref_11"><a href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>fn</var>) is <emu-val>true</emu-val>.</li><li>If <var>referencingScriptOrModule</var> is a <emu-xref href="#sec-abstract-module-records"><a href="https://tc39.github.io/ecma262/#sec-abstract-module-records">Module Record</a></emu-xref>, then<ol><li>Assert: ModuleEvaluation has already been invoked on <var>referencingScriptOrModule</var> and successfully completed.</li><li>Let <var>referrer</var> be <emu-xref aoid="GetModuleNamespace" id="_ref_12"><a href="https://tc39.github.io/ecma262/#sec-getmodulenamespace">GetModuleNamespace</a></emu-xref>(<var>referencingScriptOrModule</var>).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_13"><a href="https://tc39.github.io/ecma262/#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>referrer</var>, <var>promiseCapability</var>).</li></ol></li><li>Else,<ol><li>Let <var>referrer</var> be <emu-val>null</emu-val>.</li></ol></li><li>Let <var>value</var> be <emu-xref aoid="Call" id="_ref_14"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<var>fn</var>, <emu-val>undefined</emu-val>, « <var>referrer</var>, <var>specifier</var> »).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_15"><a href="https://tc39.github.io/ecma262/#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>value</var>, <var>promiseCapability</var>).</li><li>Perform ! <emu-xref aoid="Call" id="_ref_16"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Resolve]], <emu-val>undefined</emu-val>, « <var>value</var> »).
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<!-- es6num="15.2.1.16.1" -->
<emu-clause id="sec-parsemodule" aoid="ParseModule">
<h1><span class="secnum">2</span>ParseModule ( <var>sourceText</var>, <var>realm</var>, <var>hostDefined</var> )</h1>
<emu-alg><ol><li>...</li><li>Let <var>exportEntries</var> be ExportEntries of <var>body</var>.</li><li><ins>Let <var>resolvedModules</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref></ins>.</li><li>For each ExportEntry <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> <var>ee</var> in <var>exportEntries</var>, do<ol><li>...</li></ol></li><li>Return <emu-xref href="#sec-source-text-module-records"><a href="https://tc39.github.io/ecma262/#sec-source-text-module-records">Source Text Module Record</a></emu-xref> {[[Realm]]: <var>realm</var>, [[Environment]]: <emu-val>undefined</emu-val>, [[HostDefined]]: <var>hostDefined</var>, [[Namespace]]: <emu-val>undefined</emu-val>, [[Evaluated]]: <emu-val>false</emu-val>, [[ECMAScriptCode]]: <var>body</var>, [[RequestedModules]]: <var>requestedModules</var>, [[ImportEntries]]: <var>importEntries</var>, [[LocalExportEntries]]: <var>localExportEntries</var>, [[StarExportEntries]]: <var>starExportEntries</var>, [[IndirectExportEntries]]: <var>indirectExportEntries</var><ins>, [[ResolvedModules]]: <var>resolvedModules</var></ins>}.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-resolvemodule" aoid="ResolveModule">
<h1><span class="secnum">3</span>ResolveModule ( <var>referencingModule</var>, <var>specifier</var> )</h1>
<p>The abstract operation ResolveModule with arguments <var>referencingModule</var> and <var>specifier</var> resolves the concrete <emu-xref href="#sec-abstract-module-records"><a href="https://tc39.github.io/ecma262/#sec-abstract-module-records">Module Record</a></emu-xref> subclass instance that corresponds to the ModuleSpecifier String, <var>specifier</var>, occurring within the context of the module represented by the <emu-xref href="#sec-source-text-module-records"><a href="https://tc39.github.io/ecma262/#sec-source-text-module-records">Source Text Module Record</a></emu-xref> <var>referencingModule</var>. ResolveModule performs the following steps:</p>
<emu-alg><ol><li>Assert: <var>referencingModule</var> is a <emu-xref href="#sec-source-text-module-records"><a href="https://tc39.github.io/ecma262/#sec-source-text-module-records">Source Text Module Record</a></emu-xref>.</li><li>Assert: <emu-xref aoid="Type" id="_ref_17"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>specifier</var>) is String.</li><li>Let <var>resolvedModules</var> be <var>referencingModule</var>.[[ResolvedModules]].</li><li>Repeat for each <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> {[[Key]], [[Value]]} <var>p</var> that is an element of <var>requiredModule</var>,<ol><li>If <var>p</var>.[[Key]] is is equal <var>specifier</var>, then<ol><li>Return <var>p</var>.[[Value]].</li></ol></li></ol></li><li>Let <var>requiredModule</var> be ? <emu-xref aoid="HostResolveImportedModule" id="_ref_18"><a href="https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref>(<var>referencingModule</var>, <var>specifier</var>).</li><li>Append <var>requiredModule</var> as the last element of <var>resolvedModules</var>.</li><li>Return <var>requiredModule</var>.</li></ol></emu-alg></emu-clause>
<!-- es6num="15.2.1.16.5" -->
<emu-clause id="sec-moduleevaluation">
<h1><span class="secnum">4</span>ModuleEvaluation( ) Concrete Method</h1>
<emu-alg><ol><li>...</li><li>For each String <var>required</var> that is an element of <var>module</var>.[[RequestedModules]], do<ol><li>Let <var>requiredModule</var> be ! <del><emu-xref aoid="HostResolveImportedModule" id="_ref_19"><a href="https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref></del><ins><emu-xref aoid="ResolveModule" id="_ref_20"><a href="#sec-resolvemodule">ResolveModule</a></emu-xref></ins>(<var>module</var>, <var>required</var>).</li><li>...</li></ol></li><li>...
</li></ol></emu-alg>
</emu-clause>
<!-- es6num="15.2.1.16.2" -->
<emu-clause id="sec-getexportednames">
<h1><span class="secnum">5</span>GetExportedNames( <var>exportStarSet</var> ) Concrete Method</h1>
<emu-alg><ol><li>...</li><li>Let <var>requestedModule</var> be ? <del><emu-xref aoid="HostResolveImportedModule" id="_ref_21"><a href="https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref></del><ins><emu-xref aoid="ResolveModule" id="_ref_22"><a href="#sec-resolvemodule">ResolveModule</a></emu-xref></ins>(<var>module</var>, <var>e</var>.[[ModuleRequest]]).</li><li>...
</li></ol></emu-alg>
</emu-clause>
<!-- es6num="15.2.1.16.3" -->
<emu-clause id="sec-resolveexport">
<h1><span class="secnum">6</span>ResolveExport( <var>exportName</var>, <var>resolveSet</var> ) Concrete Method</h1>
<emu-alg><ol><li>...</li><li>For each ExportEntry <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> <var>e</var> in <var>module</var>.[[IndirectExportEntries]], do<ol><li>If <emu-xref aoid="SameValue" id="_ref_23"><a href="https://tc39.github.io/ecma262/#sec-samevalue">SameValue</a></emu-xref>(<var>exportName</var>, <var>e</var>.[[ExportName]]) is <emu-val>true</emu-val>, then</li><li>Assert: <var>module</var> imports a specific binding for this export.</li><li>Let <var>importedModule</var> be ? <del><emu-xref aoid="HostResolveImportedModule" id="_ref_24"><a href="https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref></del><ins><emu-xref aoid="ResolveModule" id="_ref_25"><a href="#sec-resolvemodule">ResolveModule</a></emu-xref></ins>(<var>module</var>, <var>e</var>.[[ModuleRequest]]).</li><li>...</li></ol></li><li>...</li><li>For each ExportEntry <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> <var>e</var> in <var>module</var>.[[StarExportEntries]], do<ol><li>Let <var>importedModule</var> be ? <del><emu-xref aoid="HostResolveImportedModule" id="_ref_26"><a href="https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref></del><ins><emu-xref aoid="ResolveModule" id="_ref_27"><a href="#sec-resolvemodule">ResolveModule</a></emu-xref></ins>(<var>module</var>, <var>e</var>.[[ModuleRequest]]).
...</li></ol></li><li>...
</li></ol></emu-alg>
</emu-clause>
<!-- es6num="15.2.1.16.4" -->
<emu-clause id="sec-moduledeclarationinstantiation">
<h1><span class="secnum">7</span>ModuleDeclarationInstantiation( ) Concrete Method</h1>
<emu-alg><ol><li>...</li><li>For each String <var>required</var> that is an element of <var>module</var>.[[RequestedModules]], do<ol><li>NOTE: Before instantiating a module, all of the modules it requested must be available. An implementation may perform this test at any time prior to this point.</li><li>Let <var>requiredModule</var> be ? <del><emu-xref aoid="HostResolveImportedModule" id="_ref_28"><a href="https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref></del><ins><emu-xref aoid="ResolveModule" id="_ref_29"><a href="#sec-resolvemodule">ResolveModule</a></emu-xref></ins>(<var>module</var>, <var>required</var>).</li><li>...</li></ol></li><li>...</li><li>For each ImportEntry <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> <var>in</var> in <var>module</var>.[[ImportEntries]], do<ol><li>Let <var>importedModule</var> be ! <del><emu-xref aoid="HostResolveImportedModule" id="_ref_30"><a href="https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule">HostResolveImportedModule</a></emu-xref></del><ins><emu-xref aoid="ResolveModule" id="_ref_31"><a href="#sec-resolvemodule">ResolveModule</a></emu-xref></ins>(<var>module</var>, <var>in</var>.[[ModuleRequest]]).</li><li>NOTE: The above call cannot fail because imported module requests are a subset of <var>module</var>.[[RequestedModules]], and these have been resolved earlier in this algorithm.</li><li>...</li></ol></li><li>...
</li></ol></emu-alg>
</emu-clause>
<!-- es6num="18.2.1.1" -->
<emu-clause id="sec-performeval" aoid="PerformEval">
<h1><span class="secnum">8</span>Runtime Semantics: PerformEval( <var>x</var>, <var>evalRealm</var>, <var>strictCaller</var>, <var>direct</var> )</h1>
<p>The abstract operation PerformEval with arguments <var>x</var>, <var>evalRealm</var>, <var>strictCaller</var>, and <var>direct</var> performs the following steps:</p>
<emu-alg><ol><li>Assert: If <var>direct</var> is <emu-val>false</emu-val>, then <var>strictCaller</var> is also <emu-val>false</emu-val>.</li><li><ins>If <var>direct</var> is <emu-val>true</emu-val>, then</ins><ol><li><ins>Let <var>x</var> be ? <emu-xref aoid="InvokeDirectEvalHook" id="_ref_32"><a href="#sec-invokedirectevalhook">InvokeDirectEvalHook</a></emu-xref>(<var>x</var>, <var>evalRealm</var>).</ins></li></ol></li><li>If <emu-xref aoid="Type" id="_ref_33"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>x</var>) is not String, return <var>x</var>.</li><li>...
</li></ol></emu-alg>
</emu-clause>
<!-- es6num="12.3.4.1" -->
<emu-clause id="sec-function-calls-runtime-semantics-evaluation">
<h1><span class="secnum">9</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="CallExpression" collapsed="" id="prod-CallExpression">
<emu-nt><a href="#prod-CallExpression">CallExpression</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="ec98fef7"><emu-nt><a href="https://tc39.github.io/ecma262/#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>expr</var> be CoveredCallExpression of <emu-nt><a href="https://tc39.github.io/ecma262/#prod-CoverCallExpressionAndAsyncArrowHead">CoverCallExpressionAndAsyncArrowHead</a></emu-nt>.</li><li>Let <var>memberExpr</var> be the <emu-nt><a href="https://tc39.github.io/ecma262/#prod-MemberExpression">MemberExpression</a></emu-nt> of <var>expr</var>.</li><li>Let <var>arguments</var> be the <emu-nt><a href="https://tc39.github.io/ecma262/#prod-Arguments">Arguments</a></emu-nt> of <var>expr</var>.</li><li>Let <var>ref</var> be the result of evaluating <var>memberExpr</var>.</li><li>Let <var>func</var> be ? <emu-xref aoid="GetValue" id="_ref_34"><a href="https://tc39.github.io/ecma262/#sec-getvalue">GetValue</a></emu-xref>(<var>ref</var>).</li><li>If <emu-xref aoid="Type" id="_ref_35"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>ref</var>) is <emu-xref href="#sec-reference-specification-type"><a href="https://tc39.github.io/ecma262/#sec-reference-specification-type">Reference</a></emu-xref> and <emu-xref href="#ao-ispropertyreference"><a href="https://tc39.github.io/ecma262/#ao-ispropertyreference">IsPropertyReference</a></emu-xref>(<var>ref</var>) is <emu-val>false</emu-val> and <emu-xref href="#ao-getreferencedname"><a href="https://tc39.github.io/ecma262/#ao-getreferencedname">GetReferencedName</a></emu-xref>(<var>ref</var>) is <code>"eval"</code>, then<ol><li><ins>Let <var>evalRealm</var> be <emu-xref href="#current-realm"><a href="https://tc39.github.io/ecma262/#current-realm">the current Realm Record</a></emu-xref></ins>.</li><li><ins>Let <var>isDirectEval</var> be ? <emu-xref aoid="InvokeIsDirectEvalHook" id="_ref_36"><a href="#sec-invokeisdirectevalhook">InvokeIsDirectEvalHook</a></emu-xref>(<var>evalRealm</var>, <var>func</var>)</ins>.</li><li>If <ins><var>isDirectEval</var></ins><del><emu-xref aoid="SameValue" id="_ref_37"><a href="https://tc39.github.io/ecma262/#sec-samevalue">SameValue</a></emu-xref>(<var>func</var>, <emu-xref href="#sec-eval-x"><a href="https://tc39.github.io/ecma262/#sec-eval-x">%eval%</a></emu-xref>)</del> is <emu-val>true</emu-val>, then<ol><li>Let <var>argList</var> be ? ArgumentListEvaluation(<var>arguments</var>).</li><li>If <var>argList</var> has no elements, return <emu-val>undefined</emu-val>.</li><li>Let <var>evalText</var> be the first element of <var>argList</var>.</li><li>If the source code matching this <emu-nt id="_ref_93"><a href="#prod-CallExpression">CallExpression</a></emu-nt> is <emu-xref href="#sec-strict-mode-code"><a href="https://tc39.github.io/ecma262/#sec-strict-mode-code">strict mode code</a></emu-xref>, let <var>strictCaller</var> be <emu-val>true</emu-val>. Otherwise let <var>strictCaller</var> be <emu-val>false</emu-val>.</li><li><del>Let <var>evalRealm</var> be <emu-xref href="#current-realm"><a href="https://tc39.github.io/ecma262/#current-realm">the current Realm Record</a></emu-xref></del>.</li><li>Perform ? <emu-xref aoid="HostEnsureCanCompileStrings" id="_ref_38"><a href="https://tc39.github.io/ecma262/#sec-hostensurecancompilestrings">HostEnsureCanCompileStrings</a></emu-xref>(<var>evalRealm</var>, <var>evalRealm</var>).</li><li>Return ? <emu-xref aoid="PerformEval" id="_ref_39"><a href="#sec-performeval">PerformEval</a></emu-xref>(<var>evalText</var>, <var>evalRealm</var>, <var>strictCaller</var>, <emu-val>true</emu-val>).</li></ol></li></ol></li><li>...
</li></ol></emu-alg>
...
</emu-clause>
<emu-clause id="sec-import-call-runtime-semantics-evaluation">
<h1><span class="secnum">10</span>Runtime Semantics: Evaluation</h1>
<emu-grammar><emu-production name="ImportCall" collapsed="" id="prod-ImportCall">
<emu-nt><a href="#prod-ImportCall">ImportCall</a></emu-nt><emu-geq>:</emu-geq><emu-rhs a="26c293e4"><emu-t>import</emu-t><emu-t>(</emu-t><emu-nt><a href="https://tc39.github.io/ecma262/#prod-AssignmentExpression">AssignmentExpression</a></emu-nt><emu-t>)</emu-t></emu-rhs>
</emu-production></emu-grammar>
<emu-alg><ol><li>Let <var>referencingScriptOrModule</var> be ! <emu-xref aoid="GetActiveScriptOrModule" id="_ref_40"><a href="https://tc39.github.io/ecma262/#sec-getactivescriptormodule">GetActiveScriptOrModule</a></emu-xref>().</li><li>Assert: <var>referencingScriptOrModule</var> is a <emu-xref href="#script-record"><a href="https://tc39.github.io/ecma262/#script-record">Script Record</a></emu-xref> or <emu-xref href="#sec-abstract-module-records"><a href="https://tc39.github.io/ecma262/#sec-abstract-module-records">Module Record</a></emu-xref> (i.e. is not <emu-val>null</emu-val>).</li><li>Let <var>argRef</var> be the result of evaluating <emu-nt><a href="https://tc39.github.io/ecma262/#prod-AssignmentExpression">AssignmentExpression</a></emu-nt>.</li><li>Let <var>specifier</var> be ? <emu-xref aoid="GetValue" id="_ref_41"><a href="https://tc39.github.io/ecma262/#sec-getvalue">GetValue</a></emu-xref>(<var>argRef</var>).</li><li>Let <var>promiseCapability</var> be ! <emu-xref aoid="NewPromiseCapability" id="_ref_42"><a href="https://tc39.github.io/ecma262/#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<emu-xref href="#sec-promise-constructor"><a href="https://tc39.github.io/ecma262/#sec-promise-constructor">%Promise%</a></emu-xref>).</li><li>Let <var>specifierString</var> be <emu-xref aoid="ToString" id="_ref_43"><a href="https://tc39.github.io/ecma262/#sec-tostring">ToString</a></emu-xref>(<var>specifier</var>).</li><li><emu-xref aoid="IfAbruptRejectPromise" id="_ref_44"><a href="https://tc39.github.io/ecma262/#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>specifierString</var>, <var>promiseCapability</var>).</li><li><ins>Let <var>ctx</var> be the <emu-xref href="#running-execution-context"><a href="https://tc39.github.io/ecma262/#running-execution-context">running execution context</a></emu-xref></ins>.</li><li><ins>Let <var>currentRealm</var> be ctx's <emu-xref aoid="Realm" id="_ref_45"><a href="#sec-realm">Realm</a></emu-xref></ins>.</li><li><ins>Perform ! <emu-xref aoid="InvokeImportHook" id="_ref_46"><a href="#sec-invokeimporthook">InvokeImportHook</a></emu-xref>(<var>currentRealm</var>, <var>referencingScriptOrModule</var>, <var>specifierString</var>, <var>promiseCapability</var>)</ins>.</li><li><del>Perform ! HostImportModuleDynamically(<var>referencingScriptOrModule</var>, <var>specifierString</var>, <var>promiseCapability</var>)</del>.</li><li>Return <var>promiseCapability</var>.[[Promise]].
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-realm-objects">
<h1><span class="secnum">11</span>Realm Objects</h1>
<emu-clause id="sec-realm-abstract-operations">
<h1><span class="secnum">11.1</span>Realm Abstract Operations</h1>
<emu-clause id="sec-create-realm-rec">
<h1><span class="secnum">11.1.1</span>CreateRealmRec ( <var>intrinsics</var> )</h1>
<emu-alg><ol><li>Let <var>realmRec</var> be a new <emu-xref href="#realm-record"><a href="https://tc39.github.io/ecma262/#realm-record">Realm Record</a></emu-xref>.</li><li>If <var>intrinsics</var> is <emu-val>undefined</emu-val>, then<ol><li>Perform <emu-xref aoid="CreateIntrinsics" id="_ref_47"><a href="https://tc39.github.io/ecma262/#sec-createintrinsics">CreateIntrinsics</a></emu-xref>(realmRec).</li></ol></li><li>Else<ol><li>Assert: In this case, <var>intrinsics</var> must be a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> with field names listed in column one of Table 7.</li><li>Set <var>realmRec</var>.[[Intrinsics]] to <var>intrinsics</var>.</li></ol></li><li>Set <var>realmRec</var>.[[GlobalObject]] to <emu-val>undefined</emu-val>.</li><li>Set <var>realmRec</var>.[[GlobalEnv]] to <emu-val>undefined</emu-val>.</li><li>Set <var>realmRec</var>.[[TemplateMap]] to a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return <var>realmRec</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-realm-built-in-function-objects">
<h1><span class="secnum">11.2</span>Built-in Function Objects</h1>
<emu-clause id="sec-realm-default-import-hook-functions">
<h1><span class="secnum">11.2.1</span>Realm Default Import Hook Functions</h1>
<p>A <emu-xref aoid="Realm" id="_ref_48"><a href="#sec-realm">Realm</a></emu-xref> default import hook function is an anonymous built-in function.</p>
<p>When a <emu-xref aoid="Realm" id="_ref_49"><a href="#sec-realm">Realm</a></emu-xref> default import hook function is called with arguments <var>referrer</var> and <var>specifier</var>, the following steps are taken:</p>
<emu-alg><ol><li>Throw a new <emu-val>TypeError</emu-val>.
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
By default, newly created realms do not expose host specific behavior when evaluating <var>import()</var> calls.
</div></emu-note>
</emu-clause>
</emu-clause>
<emu-clause id="sec-the-realm-constructor">
<h1><span class="secnum">11.3</span>The Realm Constructor</h1>
<p>
The Ream constructor is the %<emu-xref aoid="Realm" id="_ref_50"><a href="#sec-realm">Realm</a></emu-xref>% intrinsic object and the initial value of the <emu-val>Realm</emu-val> property of the <emu-xref href="#global-object"><a href="https://tc39.github.io/ecma262/#global-object">global object</a></emu-xref>. When called as a constructor it creates and initializes a new <emu-xref aoid="Realm" id="_ref_51"><a href="#sec-realm">Realm</a></emu-xref> object. <emu-xref aoid="Realm" id="_ref_52"><a href="#sec-realm">Realm</a></emu-xref> is not intended to be called as a function and will throw an exception when called in that manner.
</p>
<p>
The <emu-xref aoid="Realm" id="_ref_53"><a href="#sec-realm">Realm</a></emu-xref> constructor is designed to be subclassable. It may be used as the value in an extends clause of a class definition. Subclass constructors that intend to inherit the specified <emu-xref aoid="Realm" id="_ref_54"><a href="#sec-realm">Realm</a></emu-xref> behaviour must include a super call to the <emu-xref aoid="Realm" id="_ref_55"><a href="#sec-realm">Realm</a></emu-xref> constructor to create and initialize the subclass instance with the internal state necessary to support the Realm.prototype built-in methods.
</p>
<emu-clause id="sec-realm" aoid="Realm">
<h1><span class="secnum">11.3.1</span>Realm ([ <var>options</var> ])</h1>
When Realm is called with argument <var>option</var> performs the following steps:
<emu-alg><ol><li>If NewTarget is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>O</var> be ? <emu-xref aoid="OrdinaryCreateFromConstructor" id="_ref_56"><a href="https://tc39.github.io/ecma262/#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(NewTarget, "%RealmPrototype%", « [[Realm]] »).</li><li>If <var>options</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>parentRealm</var> be <emu-xref href="#current-realm"><a href="https://tc39.github.io/ecma262/#current-realm">the current Realm Record</a></emu-xref>.</li><li>Let <var>opts</var> be ? <emu-xref aoid="ToObject" id="_ref_57"><a href="https://tc39.github.io/ecma262/#sec-toobject">ToObject</a></emu-xref>(<var>options</var>).</li><li>Let <var>importHook</var> be ? <emu-xref aoid="Get" id="_ref_58"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>opts</var>, "importHook").</li><li>If <var>importHook</var> is equal <code>"inherit"</code>, then<ol><li>Set <var>importHook</var> to <var>parentRealm</var>.[[ImportHook]].</li></ol></li><li>Else if <var>importHook</var> is not <emu-val>undefined</emu-val> and <emu-xref aoid="IsCallable" id="_ref_59"><a href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>importHook</var>) is <emu-val>false</emu-val>, throw a TypeError exception.</li><li>Let <var>importMetaHook</var> be ? <emu-xref aoid="Get" id="_ref_60"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>opts</var>, "importMetaHook").</li><li>If <var>importMetaHook</var> is equal <code>"inherit"</code>, then<ol><li>Set <var>importMetaHook</var> to <var>parentRealm</var>.[[ImportMetaHook]].</li></ol></li><li>Else if <var>importMetaHook</var> is not <emu-val>undefined</emu-val> and <emu-xref aoid="IsCallable" id="_ref_61"><a href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>importMetaHook</var>) is <emu-val>false</emu-val>, throw a TypeError exception.</li><li>Let <var>evalHook</var> be ? <emu-xref aoid="Get" id="_ref_62"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>opts</var>, "evalHook").</li><li>If <var>evalHook</var> is equal <code>"inherit"</code>, then<ol><li>Set <var>evalHook</var> to <var>parentRealm</var>.[[EvalHook]].</li></ol></li><li>Else if <var>evalHook</var> is not <emu-val>undefined</emu-val> and <emu-xref aoid="IsCallable" id="_ref_63"><a href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>evalHook</var>) is <emu-val>false</emu-val>, throw a TypeError exception.</li><li>Let <var>isDirectEvalHook</var> be ? <emu-xref aoid="Get" id="_ref_64"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>opts</var>, "isDirectEvalHook").</li><li>If <var>isDirectEvalHook</var> is equal <code>"inherit"</code>, then<ol><li>Set <var>isDirectEvalHook</var> to <var>parentRealm</var>.[[IsDirectEvalHook]].</li></ol></li><li>Else if <var>isDirectEvalHook</var> is not <emu-val>undefined</emu-val> and <emu-xref aoid="IsCallable" id="_ref_65"><a href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>isDirectEvalHook</var>) is <emu-val>false</emu-val>, throw a TypeError exception.</li><li>Let <var>intrinsics</var> be ? <emu-xref aoid="Get" id="_ref_66"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>opts</var>, "intrinsics").</li><li>If <var>intrinsics</var> is equal <code>"inherit"</code>, then<ol><li>Set <var>intrinsics</var> to <var>parentRealm</var>.[[Intrinsics]].</li></ol></li><li>Else if <var>intrinsics</var> is not <emu-val>undefined</emu-val>, throw a TypeError exception.</li><li>Let <var>thisValue</var> be ? <emu-xref aoid="Get" id="_ref_67"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>opts</var>, "thisValue").</li><li>If <var>thisValue</var> is not <emu-val>undefined</emu-val> and <emu-xref aoid="Type" id="_ref_68"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>thisValue</var>) is not Object, throw a TypeError exception.</li></ol></li><li>Let <var>realmRec</var> be CreateRealmRec(<var>intrinsics</var>).</li><li>Set <var>O</var>.[[Realm]] to <var>realmRec</var>.</li><li>Perform ? <emu-xref aoid="SetRealmGlobalObject" id="_ref_69"><a href="https://tc39.github.io/ecma262/#sec-setrealmglobalobject">SetRealmGlobalObject</a></emu-xref>(<var>realmRec</var>, <emu-val>undefined</emu-val>, <var>thisValue</var>).</li><li>If <var>importHook</var> is <emu-val>undefined</emu-val>, then<ol><li>Let <var>importHook</var> be a new built-in function object as defined in <emu-xref href="#sec-realm-default-import-hook-functions" id="_ref_0"><a href="#sec-realm-default-import-hook-functions">11.2.1</a></emu-xref>.</li></ol></li><li>Set <var>realmRec</var>.[[ImportHook]] to <var>importHook</var>.</li><li>If <var>evalHook</var> is not <emu-val>undefined</emu-val>, then<ol><li>Set <var>realmRec</var>.[[EvalHook]] to <var>evalHook</var>.</li></ol></li><li>If <var>isDirectEvalHook</var> is not <emu-val>undefined</emu-val>, then<ol><li>Set <var>realmRec</var>.[[IsDirectEvalHook]] to <var>isDirectEvalHook</var>.</li></ol></li><li>Let <var>init</var> be ? <emu-xref aoid="GetMethod" id="_ref_70"><a href="https://tc39.github.io/ecma262/#sec-getmethod">GetMethod</a></emu-xref>(<var>O</var>, <emu-val>"init"</emu-val>).</li><li>If <emu-xref aoid="IsCallable" id="_ref_71"><a href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>init</var>) is not <emu-val>true</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Perform ? <emu-xref aoid="Call" id="_ref_72"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<var>init</var>, <var>O</var>).</li><li>Return <var>O</var>.
</li></ol></emu-alg>
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-the-realm-constructor">
<h1><span class="secnum">11.4</span>Properties of the Realm Constructor</h1>
The value of the [[Prototype]] internal slot of the <emu-val>Realm</emu-val> constructor is the intrinsic object <emu-xref href="#sec-properties-of-the-function-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-function-prototype-object">%FunctionPrototype%</a></emu-xref>.
</emu-clause>
<emu-clause id="sec-properties-of-the-realm-prototype-object">
<h1><span class="secnum">11.5</span>Properties of the Realm Prototype Object</h1>
<emu-clause id="sec-realm.prototype.init">
<h1><span class="secnum">11.5.1</span>Realm.prototype.init ()</h1>
<emu-alg><ol><li>Let <var>O</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_73"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have an [[Realm]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Perform ? <emu-xref aoid="SetDefaultGlobalBindings" id="_ref_74"><a href="https://tc39.github.io/ecma262/#sec-setdefaultglobalbindings">SetDefaultGlobalBindings</a></emu-xref>(<var>O</var>.[[Realm]]).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
Extensible web: This is the dynamic way to define globals in a new realm.
</div></emu-note>
</emu-clause>
<emu-clause id="sec-realm.prototype.eval">
<h1><span class="secnum">11.5.2</span>Realm.prototype.eval ( <var>x</var> )</h1>
Synchronously execute a top-level script. The <var>x</var> is interpreted as a Script and evaluated with this bound to the realm's <emu-xref href="#global-object"><a href="https://tc39.github.io/ecma262/#global-object">global object</a></emu-xref>.
<emu-alg><ol><li>Let <var>O</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_75"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have an [[Realm]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>evalRealm</var> be <var>O</var>.[[Realm]].</li><li>Perform ? <emu-xref aoid="HostEnsureCanCompileStrings" id="_ref_76"><a href="https://tc39.github.io/ecma262/#sec-hostensurecancompilestrings">HostEnsureCanCompileStrings</a></emu-xref>(<emu-xref href="#current-realm"><a href="https://tc39.github.io/ecma262/#current-realm">the current Realm Record</a></emu-xref>, <var>evalRealm</var>).</li><li>Return ? <emu-xref aoid="PerformEval" id="_ref_77"><a href="#sec-performeval">PerformEval</a></emu-xref>(<var>x</var>, <var>evalRealm</var>, <emu-val>false</emu-val>, <emu-val>false</emu-val>).
</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
Extensible web: This is the dynamic equivalent of a <script> in HTML.
</div></emu-note>
</emu-clause>
<emu-clause id="sec-realm.prototype.global">
<h1><span class="secnum">11.5.3</span>get Realm.prototype.global</h1>
Realm.prototype.global is an accessor property whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:
<emu-alg><ol><li>Let <var>O</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_78"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have an [[Realm]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Return <var>O</var>.[[Realm]].[[GlobalObject]].
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-realm.prototype.thisValue">
<h1><span class="secnum">11.5.4</span>get Realm.prototype.thisValue</h1>
Realm.prototype.thisValue is an accessor property whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:
<emu-alg><ol><li>Let <var>O</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_79"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have an [[Realm]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>envRec</var> be <var>O</var>.[[Realm]].[[GlobalEnv]].</li><li>Return <var>envRec</var>.[[GlobalThisValue]].
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-realm.prototype.stdlib">
<h1><span class="secnum">11.5.5</span>get Realm.prototype.stdlib</h1>
Realm.prototype.stdlib is an accessor property whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:
<emu-alg><ol><li>Let <var>O</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_80"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have an [[Realm]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>realmRec</var> be <var>O</var>.[[Realm]].</li><li>Let global be realmRec.[[GlobalObject]].</li><li>Let <var>stdlib</var> be <emu-xref aoid="ObjectCreate" id="_ref_81"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>For each property of the Global Object specified in clause <emu-xref href="#sec-global-object"><a href="https://tc39.github.io/ecma262/#sec-global-object">18</a></emu-xref> that correspond to an intrinsic object, do:<ol><li>Let <var>name</var> be the String value of the property name.</li><li>Let <var>value</var> be the corresponding value of the intrinsic object from record <var>realmRec</var>.[[Intrinsics]].</li><li>Let <var>descObj</var> be <emu-xref aoid="ObjectCreate" id="_ref_82"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>Perform ? <emu-xref aoid="DefinePropertyOrThrow" id="_ref_83"><a href="https://tc39.github.io/ecma262/#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>descObj</var>, <emu-val>"value"</emu-val>, PropertyDescriptor{[[Value]]: <var>value</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>true</emu-val>}).</li><li>Perform ? <emu-xref aoid="DefinePropertyOrThrow" id="_ref_84"><a href="https://tc39.github.io/ecma262/#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>stdlib</var>, <var>name</var>, PropertyDescriptor{[[Value]]: <var>descObj</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>true</emu-val>}).</li></ol></li><li>Return <var>stdlib</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-realm.prototype.intrinsics">
<h1><span class="secnum">11.5.6</span>get Realm.prototype.intrinsics</h1>
Realm.prototype.intrinsics is an accessor property whose set accessor function is <emu-val>undefined</emu-val>. Its get accessor function performs the following steps:
<emu-alg><ol><li>Let <var>O</var> be <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_85"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>O</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>If <var>O</var> does not have an [[Realm]] internal slot, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>realmRec</var> be <var>O</var>.[[Realm]].</li><li>Let <var>intrinsics</var> be <emu-xref aoid="ObjectCreate" id="_ref_86"><a href="https://tc39.github.io/ecma262/#sec-objectcreate">ObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-object-prototype-object"><a href="https://tc39.github.io/ecma262/#sec-properties-of-the-object-prototype-object">%ObjectPrototype%</a></emu-xref>).</li><li>For each intrinsic name listed in <emu-xref href="#table-7"><a href="https://tc39.github.io/ecma262/#table-7">Table 7</a></emu-xref>, do:<ol><li>Let <var>intrinsicName</var> be the String value in column one of the table.</li><li>Let <var>name</var> be the String value of <var>intrinsicName</var> without the <emu-val>%</emu-val> symbols.</li><li>Let <var>value</var> be the value of the field name <var>intrisicName</var> from record <var>realmRec</var>.[[Intrinsics]].</li><li>Perform ? <emu-xref aoid="DefinePropertyOrThrow" id="_ref_87"><a href="https://tc39.github.io/ecma262/#sec-definepropertyorthrow">DefinePropertyOrThrow</a></emu-xref>(<var>intrinsics</var>, <var>name</var>, PropertyDescriptor{[[Value]]: <var>value</var>, [[Writable]]: <emu-val>true</emu-val>, [[Enumerable]]: <emu-val>true</emu-val>, [[Configurable]]: <emu-val>true</emu-val>}).</li></ol></li><li>Return <var>intrinsics</var>.
</li></ol></emu-alg>
</emu-clause>
<emu-clause id="sec-realm.prototype-@@tostringtag">
<h1><span class="secnum">11.5.7</span>Realm.prototype [ @@toStringTag ]</h1>
The initial value of the @@toStringTag property is the String value "<emu-xref aoid="Realm" id="_ref_88"><a href="#sec-realm">Realm</a></emu-xref>". This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
</emu-clause>
</emu-clause>
<emu-clause id="sec-properties-of-realm-instances">
<h1><span class="secnum">11.6</span>Properties of Realm Instances</h1>
<emu-xref aoid="Realm" id="_ref_89"><a href="#sec-realm">Realm</a></emu-xref> instances are ordinary objects that inherit properties from the <emu-xref aoid="Realm" id="_ref_90"><a href="#sec-realm">Realm</a></emu-xref> prototype object (the intrinsic, %RealmPrototype%). <emu-xref aoid="Realm" id="_ref_91"><a href="#sec-realm">Realm</a></emu-xref> instances are initially created with the internal slots described in <emu-xref href="#table-3" id="_ref_1"><a href="#table-3">Table 3</a></emu-xref>.
<emu-table id="table-3" caption="Internal Slots of Realm Instances"><figure><figcaption>Table 3: Internal Slots of <emu-xref aoid="Realm" id="_ref_92"><a href="#sec-realm">Realm</a></emu-xref> Instances</figcaption>
<table>
<tbody>
<tr>
<th>Internal Slot</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>[[Realm]]</td>
<td><emu-xref href="#realm-record"><a href="https://tc39.github.io/ecma262/#realm-record">Realm Record</a></emu-xref></td>
<td>The <emu-xref href="#realm-record"><a href="https://tc39.github.io/ecma262/#realm-record">Realm Record</a></emu-xref> for the initial <emu-xref href="#sec-execution-contexts"><a href="https://tc39.github.io/ecma262/#sec-execution-contexts">execution context</a></emu-xref>.</td>
</tr>
</tbody>
</table>
</figure></emu-table>
</emu-clause>
</emu-clause>
</div></body>