diff --git a/source b/source index 1cb22aa92c9..7e43c4e2606 100644 --- a/source +++ b/source @@ -2643,6 +2643,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
To create a new browsing context, given
- null or a Document
object creator:
Document
object creator, and browsing context group
+ group:
+
+
Let browsingContext be a new browsing context.
Let featurePolicy be the result of creating a feature policy given browsingContext and origin.
Let agent be the result of obtaining a similar-origin window agent given + origin and group.
Let realm execution context be the result of creating a new JavaScript realm with the following customizations:
For the agent, use agent. This pointer is not yet defined + in the JavaScript specification; see tc39/ecma262#1357.
For the global object, create a new Window
object.
For the global this binding, use browsingContext's @@ -78110,15 +78123,17 @@ dictionary DragEventInit : MouseEventInit { context
Let browsingContext be the result of creating a new browsing - context with opener's active document.
Let group be opener's top-level browsing context's + group
Assert: opener's top-level browsing context's group is non-null, as navigating invokes this - directly.
Assert: group is non-null, as navigating invokes + this directly.
Append browsingContext to opener's - top-level browsing context's group.
Let browsingContext be the result of creating a new browsing + context with opener's active document and group.
Append browsingContext to + group.
Set browsingContext's opener browsing context to opener.
Let browsingContext be the result of creating a new browsing - context with element's node document.
Set element's nested browsing context to browsingContext.
Append group to the user agent's browsing context group set.
Append the result of creating a new browsing - context with null to group.
Let browsingContext be the result of creating a new browsing + context with null and group.
Append browsingContext to + group.
Return group.
Let realm execution context be the result of creating a new JavaScript realm with the following customizations:
For the agent, use agent. This pointer is not + yet defined in the JavaScript specification; see tc39/ecma262#1357.
For the global object, create a new Window
object.
For the global this binding, use browsingContext's @@ -90283,71 +90311,14 @@ import "https://example.com/foo/../module2.mjs"; data-x="concept-global-object-realm">realms that can synchronously access each other, and thus needs to run in a single execution thread.
-To determine whether a Window
object A and a Window
object
- B are considered same-agent Window
objects, run
- these steps:
If A's relevant settings object's responsible browsing - context's top-level browsing context's group is not B's relevant settings object's - responsible browsing context's top-level browsing context's group, then return false.
- -Unfortunately this model falls apart the moment a browsing context - is discarded. Issue #4361 sketches a setup that could - improve this situation.
-Let originA be A's relevant settings object's origin and originB be B's - relevant settings object's origin.
Two Window
objects that have the same agent does not
+ indicate they can directly access all objects created in each others realms. Two windows might be
+ required to be in same origin-domain, see IsPlatformObjectSameOrigin.
If originA is same origin with originB, then return - true.
If originA or originB is not a tuple origin, then return false.
If originA's scheme is not - originB's scheme, then return - false.
If originA's host is same - site with originB's host, then return - true.
Return false.
All same-agent Window
objects together represent a group
- of Window
objects that can synchronously access each other, though sometimes only
- after setting the document.domain
attribute
- (in)appropriately.
Until such a time that this standard has a better handle on lifetimes, it defines five types of +
Until such a time that this standard has a better handle on lifetimes, it defines four types of agents that user agents must allocate at the appropriate time.
-In the future, this standard hopes 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 all same-agent Window
- objects.
Two Window
objects that are same origin can be in
- different similar-origin window agents, for
- instance if they are each in their own browsing context group.
An agent whose [[CanBlock]] is true and whose set of realms consists of a single DedicatedWorkerGlobalScope
object's
in particular among which agents the backing data of
SharedArrayBuffer
objects can be shared.
A browsing context group has associated agent cluster map (a weak map of agent cluster key to agent + cluster). User agents are responsible for collecting them when it is deemed that nothing + can access them anymore.
+ +A scheme-and-site is a tuple of a scheme and a domain.
+ +An agent cluster key is an origin or a + scheme-and-site.
+ +To obtain an agent cluster key, given an origin + origin, run these steps:
+ +If origin is an opaque origin, then + return origin.
If origin's host's registrable domain is null, then return + origin.
Return (origin's scheme, + origin's registrable domain).
To obtain a similar-origin window agent, + given an origin origin and browsing context group + group, run these steps:
+ +Let clusterKey be the result of obtaining an agent cluster key given + origin.
Let agentCluster be the result of obtaining a browsing context agent cluster with + group and clusterKey.
Return agentCluster's similar-origin window agent.
A similar-origin window agent is an agent whose + [[CanBlock]] is false.
+ +All global objects that use this agent all have the a similar origin + and are allocated via the obtain similar-origin + window agent algorithm.
+ +To obtain a browsing context agent cluster, + given a browsing context group group and agent cluster key + key, run these steps:
+ +If group's agent cluster map[key] does not exist:
+Let agentCluster be a new agent cluster.
Set agentCluster's similar-origin window agent be a new + similar-origin window agent.
Set group's agent cluster map[key] to + agentCluster.
Return group's agent cluster map[key].
Conceptually, the agent cluster concept is an architecture-independent, idealized "process boundary" that groups together multiple "threads" (agents). The agent clusters