@@ -219,17 +219,17 @@ Note:
219
219
When a user agent is to <dfn export>create a WorkletGlobalScope</dfn> , given |workletGlobalScopeType|,
220
220
|moduleResponsesMap|, and |outsideSettings|, it <em> must</em> run the following steps:
221
221
222
- 1. Create the <a>worklet global scope execution environment</a> and run the rest of these steps
223
- in that context.
222
+ 1. Let |agent| be the result of [=obtain a worklet agent|obtaining a worklet agent=] given
223
+ |outsideSettings|. This agent corresponds to the a <a>worklet global scope execution
224
+ environment</a> . Run the rest of these steps in that context.
224
225
225
- 2. Call the JavaScript <a>InitializeHostDefinedRealm</a> abstract operation with the following
226
- customizations:
226
+ 2. Let |realmExecutionContext| be the result of
227
+ [=create a new JavaScript realm|creating a new JavaScript realm=] given |agent| and
228
+ the following customizations:
227
229
228
230
- For the global object, create a new |workletGlobalScopeType| object. Let
229
231
|workletGlobalScope| be the created object.
230
232
231
- - Let |realmExecutionContext| be the created JavaScript execution context.
232
-
233
233
3. Let |insideSettings| be the result of <a>set up a worklet environment settings object</a>
234
234
given |realmExecutionContext|, and |outsideSettings|.
235
235
@@ -275,13 +275,11 @@ When a user agent is to <dfn export>set up a worklet environment settings object
275
275
276
276
5. Let |inheritedReferrerPolicy| be |outsideSettings|'s <a>referrer policy</a> .
277
277
278
- 6. Let |workletEventLoop| be a newly created <a>event loop</a> .
279
-
280
- 7. Let |realm| be the value of |executionContext|'s Realm component.
278
+ 6. Let |realm| be the value of |executionContext|'s Realm component.
281
279
282
- 8 . Let |workletGlobalScope| be |realm|'s <a>global object</a> .
280
+ 7 . Let |workletGlobalScope| be |realm|'s <a>global object</a> .
283
281
284
- 9 . Let |settingsObject| be a new <a>environment settings object</a> whose algorithms are defined
282
+ 8 . Let |settingsObject| be a new <a>environment settings object</a> whose algorithms are defined
285
283
as follows:
286
284
287
285
: The <a>realm execution context</a>
@@ -293,12 +291,8 @@ When a user agent is to <dfn export>set up a worklet environment settings object
293
291
: The <a>responsible browsing context</a>
294
292
:: Return |inheritedResponsibleBrowsingContext|.
295
293
296
- : The <a>responsible event loop</a>
297
- :: Return |workletEventLoop|.
298
-
299
294
: The <a>responsible document</a>
300
- :: Not applicable (the <a>responsible event loop</a> is not a <a>browsing context</a>
301
- <a>event loop</a> ).
295
+ :: Not applicable (the <a>responsible event loop</a> is not a <a>window event loop</a> ).
302
296
303
297
: The <a>API URL character encoding</a>
304
298
:: Return <a>UTF-8</a> .
@@ -309,19 +303,22 @@ When a user agent is to <dfn export>set up a worklet environment settings object
309
303
: The <a for="environment settings object">origin</a>
310
304
:: Return |origin|.
311
305
306
+ : The <a for="environment settings object">top-level origin</a>
307
+ :: Return |outsideSettings|'s <a for="environment settings object">top-level origin</a> .
308
+
312
309
: The <a>HTTPS state</a>
313
310
:: Return |inheritedHTTPSState|.
314
311
315
312
: The <a>referrer policy</a>
316
313
:: Return |inheritedReferrerPolicy|.
317
314
318
- 10 . Set |settingsObject|'s <a>id</a> to a new unique opaque string, |settingsObject|' s
315
+ 9 . Set |settingsObject|'s <a>id</a> to a new unique opaque string, |settingsObject|' s
319
316
<a>creation URL</a> to |inheritedAPIBaseURL|, |settingsObject|'s <a>target browsing
320
317
context</a> to null, and |settingsObject|'s <a>active service worker</a> to null.
321
318
322
- 11 . Set |realm|'s \[[HostDefined]] field to |settingsObject|.
319
+ 10 . Set |realm|'s \[[HostDefined]] field to |settingsObject|.
323
320
324
- 12 . Return |settingsObject|.
321
+ 11 . Return |settingsObject|.
325
322
</div>
326
323
327
324
Issue: Merge this with https://html.spec.whatwg.org/multipage/workers.html#set-up-a-worker-environment-settings-object
@@ -641,4 +638,3 @@ could follow the following steps:
641
638
Arguments=["true"] ).
642
639
643
640
5. Return |result|.
644
-
0 commit comments