From f280eae95762d20a119d9e136ebc8d6b3be5f25a Mon Sep 17 00:00:00 2001
From: Domenic Denicola To fetch a classic worker script given a url, a referrer, a
- settings object, and a destination, run these steps. The algorithm will
- asynchronously complete with either null (on failure) or a new classic script (on
- success). To fetch a classic worker script given a url, a settings
+ object, and a destination, run these steps. The algorithm will asynchronously
+ complete with either null (on failure) or a new classic script (on success). Let request be a new request whose
@@ -87493,7 +87492,6 @@ interface NavigatorOnLine {
data-x="concept-request-client">client is settings object, type is " To fetch a module script tree given a url, a credentials mode,
a cryptographic nonce, a parser state, a destination, a
- settings object, and an optional ancestor list, run these steps. The
- algorithm will asynchronously complete with either null (on failure) or a module
- script (on success). If ancestor list is not given, let it be an empty list. Fetch a single module script given url, credentials
- mode, cryptographic nonce, parser state, destination, and
- settings object. If the caller of this algorithm specified custom set up the request or process the response steps, pass those along
- while fetching a single module script. If module map settings object is not given, let it be fetch client
+ settings object. Return from this algorithm and run the following steps when set up the
+ request or process the response
+ steps, pass those along while fetching a single
+ module script. Return from this algorithm, and run the following steps when fetching a single module script asynchronously completes with
result:
script
", destination is destination, referrer is referrer, mode is "same-origin
", credentials mode is "same-origin
", parser
@@ -87531,21 +87529,25 @@ interface NavigatorOnLine {
The following algorithms are used when fetching a - module script tree, and are not meant to be used directly by other specifications (or by - other parts of this specification).
-To fetch the descendants of a module script module script, given a destination and an ancestor list, run these steps. The algorithm will asynchronously complete with either null (on failure) or with module script (on @@ -87633,11 +87629,13 @@ interface NavigatorOnLine {
To fetch a single module script, given a url, a credentials mode, a cryptographic nonce, a parser state, a destination, - and a settings object, run these steps. The algorithm will asynchronously complete with - either null (on failure) or a module script (on success).
+ a fetch client settings object, and a module map settings object, run these + steps. The algorithm will asynchronously complete with either null (on failure) or a module + script (on success).Let module map be settings's module map.
Let module map be module map settings object's module + map.
If module map contains an entry with key url whose value is "fetching
", wait (in parallel) until that entry's value changes,
@@ -87658,7 +87656,7 @@ interface NavigatorOnLine {
mode, cryptographic nonce metadata is
cryptographic nonce, parser
metadata is parser stateand client
- is settings object.
If the caller specified custom steps to set up the request, perform them on request.
Let module script be the result of creating a module script given - source text, settings object, response's source text, module map settings object, response's url, credentials mode, and cryptographic nonce.
When a user agent is to run a worker for a script with
Worker
or SharedWorker
object worker, URL
- url, URL referrer, MessagePort
outside
- port, list of relevant Document
objects to add docs,
- possible WorkerGlobalScope
parent worker global scope, and a
- WorkerOptions
dictionary options, it must run the following steps:
MessagePort
outside port, and a WorkerOptions
dictionary
+ options, it must run the following steps:
Let is shared be true if worker is a SharedWorker
object, and false otherwise.
Let docs be the list of relevant Document
objects to
+ add given outside settings.
Let parent worker global scope be null.
+ +If outside settings's global
+ object is a WorkerGlobalScope
object (i.e. we are creating a nested worker),
+ set parent worker global scope to outside settings's global object.
Call the JavaScript InitializeHostDefinedRealm() abstract @@ -97204,7 +97211,7 @@ interface WorkerGlobalScope : EventTarget {
Set up a worker environment settings object with realm execution - context, and let settings object be the result.
Let destination be "sharedworker
" if is
shared is true, and "worker
" otherwise.
classic
"module
"credentials
member of options, the empty string (as no
cryptographic nonce is present for workers), "not
- parser-inserted
", destination, and settings object.In both cases, to process the
@@ -97252,7 +97260,7 @@ interface WorkerGlobalScope : EventTarget {
Associate worker with worker global scope. Create a new MessagePort
object whose owner is settings object. Let inside
+ data-x="concept-port-owner">owner
Associate inside port with worker global scope.
Event loop: Run the responsible - event loop specified by settings object until it is destroyed.
+ event loop specified by inside settings until it is destroyed.The handling of events or the execution of callbacks by tasks run by the event loop might get WorkerType { "classic", "module" }; data-x="blob protocol">blob: URLs.
Let outside settings be the incumbent settings object.
+Let worker be a new Worker
object.
Create a new MessagePort
object whose owner is the incumbent settings object. Let this
- be the outside port.
Associate the outside port with worker.
Let docs be the list of relevant Document
objects to
- add given the incumbent settings object.
Let parent worker global scope be null.
If the global object specified by the
- incumbent settings object is a WorkerGlobalScope
object (i.e. we are
- creating a nested worker), set parent worker global scope to the
- WorkerGlobalScope
object that is the global object specified by the incumbent
- settings object.
Return worker, and run the following step in parallel.
Run a worker given worker, worker URL, the - incumbent settings object's creation URL, outside port, - docs, parent worker global scope, and options.
Run a worker given worker, worker URL, outside + settings, outside port, and options.
The user agent may throw a "SecurityError
"
DOMException
and abort these steps if the request violates a policy decision (e.g.
if the user agent is configured to not allow the page to start shared workers).
Let docs be the list of relevant Document
objects to
- add given the incumbent settings object.
Let outside settings be the incumbent settings object.
Let worker be a new SharedWorker
object.
Create a new MessagePort
object whose owner is the incumbent settings object. Let
- this be the outside port.
Assign outside port to the port
attribute of worker.
SharedWorkerGlobalScope
object.
If worker global scope is not null, but the user agent has been - configured to disallow communication between the worker represented by the worker global scope and the scripts whose - settings objects are the incumbent settings - object, then set worker global scope to null.
+ configured to disallow communication between the worker represented by the worker global + scope and the scripts whose settings object is outside settings, then set worker global + scope to null.For example, a user agent could have a development mode that isolates a particular top-level browsing context from all other pages, and scripts in that development mode could be blocked from connecting to shared workers running in the normal browser mode.
-If worker global scope is not null, then run these steps:
Associate worker with worker global - scope.
Associate worker with worker global scope.
Let settings object be the relevant settings object for worker global scope.
Entangle outside port - and inside port.
Entangle outside port and inside port.
Create a trusted event that uses the
MessageEvent
interface, with the name SharedWorker : EventTarget {
source, to dispatch the event at
worker global scope.
Add to worker global
- scope's list of the worker's Document
s the
- Document
objects in docs.
Add to worker global
+ scope's list of the worker's Document
s the
+ list of relevant Document
objects to add given outside
+ settings.
If the global object specified by
- the incumbent settings object is a WorkerGlobalScope
object, add
- worker global scope to the list of the worker's workers of the
- WorkerGlobalScope
object that is the global object specified by the
- incumbent settings object.
If outside settings's global
+ object is a WorkerGlobalScope
object, add worker global scope
+ to the list of the worker's workers of outside settings's global object.
Return worker and abort all these steps.
Let parent worker global scope be null.
If the global object specified by
- the incumbent settings object is a WorkerGlobalScope
object (i.e. we
- are creating a nested worker), set parent worker global scope to the
- WorkerGlobalScope
object that is the global object specified by the incumbent
- settings object.
Return worker and perform the remaining steps in parallel.
Run a worker given worker, urlRecord, the - incumbent settings object's creation URL, outside port, - docs, parent worker global scope, and options.
Run a worker given worker, urlRecord, outside + settings, outside port, and options.