diff --git a/source b/source index fe1a5d69817..a3f6ff8c884 100644 --- a/source +++ b/source @@ -2855,6 +2855,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
Date
classSharedArrayBuffer
classTypeError
classRangeError
classtypeof
operatorServiceWorker
interfaceServiceWorkerContainer
interfaceServiceWorkerGlobalScope
interfaceThe following feature is defined in the Worklets specification:
+ +WorkletGlobalScope
JavaScript defines the concept of an agent. Until such a time that this standard + has a better handle on lifetimes, we define five types of agents that + user agents must allocate at the appropriate time.
+ +In the future, when this specification has a better handle on lifetimes, we hope + to define exactly when agents and agent + clusters are created.
+ +An agent whose [[CanBlock]] is false and whose set of realms consists of all realms of Window
objects whose
+ relevant settings object's responsible browsing context is in the same
+ unit of related similar-origin browsing contexts.
Two Window
objects that are same origin can be in
+ different similar-origin window agents, for
+ instance iif they are each in their own top-level browsing context.
An agent whose [[CanBlock]] is true and whose set of realms consists of a single DedicatedWorkerGlobalScope
object's Realm.
An agent whose [[CanBlock]] is true and whose set of realms consists a single SharedWorkerGlobalScope
object's Realm.
An agent whose [[CanBlock]] is false and whose set of realms consists of a single ServiceWorkerGlobalScope
object's Realm.
An agent whose [[CanBlock]] is false and whose set of realms consists of a single WorkletGlobalScope
+ object's Realm.
While conceptually it might be cleaner for worklets that end up with multiple + realms to put all those in the same agent, it is not observable in practice.
+For convenience in what follows, for all agents that are not similar-origin window agents, we define the agent's realm to be the single realm in its set of realms, and the agent's + global object to be the agent's realm's global object.
+ +To determine the manifestation of JavaScript's agent cluster concept in user + agents, we first define an agent subcluster for a given agent + agent, based on its type:
+ +The set containing agent and any dedicated worker agent whose
+ global object's owner set contains a
+ Document
object whose relevant Realm
+ belongs to agent.
The set containing: + +
Currently worklets have no clearly defined owner, see: w3c/css-houdini-drafts issue + #224.
The set containing agent and any dedicated worker agent whose + global object is in agent's global object's worker set.
Then, the transitive closure of agent subclusters is an + agent cluster.
+ +The agent cluster concept is crucial for defining the JavaScript
+ memory model, and in particular among which agents the backing data of
+ SharedArrayBuffer
objects can be shared.
The following pairs of global objects are each within the same agent cluster, and
+ thus can use SharedArrayBuffer
instances to share memory with each other:
Window
and a dedicated worker that it createdWindow
and the Window
of an iframe
element that
+ could be same origin-domainWindow
and the Window
that opened itThe following pairs of global objects are not within the same agent + cluster, and thus cannot share memory:
+ +Window
and a shared worker it createsWindow
and a service worker it createsWindow
and the Window
of an iframe
element that
+ cannot be same origin-domain