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
  • Origin of URLs
  • Absolute URL
  • Relative URL
  • +
  • registrable domain
  • The URL parser and basic URL @@ -78029,7 +78030,11 @@ dictionary DragEventInit : MouseEventInit {

    To create a new browsing context, given - null or a Document object creator:

    + null or a Document object creator, and browsing context group + group:

    + +
    1. Let browsingContext be a new browsing context.

    2. @@ -78051,11 +78056,19 @@ dictionary DragEventInit : MouseEventInit {
    3. Let featurePolicy be the result of creating a feature policy given browsingContext and origin.

    4. +
    5. Let agent be the result of obtaining a similar-origin window agent given + origin and group.

    6. +
    7. 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, given a browsing context opener:

          -
        1. Let browsingContext be the result of creating a new browsing - context with opener's active document.

        2. +
        3. Let group be opener's top-level browsing context's + group

        4. -
        5. Assert: opener's top-level browsing context's group is non-null, as navigating invokes this - directly.

        6. +
        7. Assert: group is non-null, as navigating invokes + this directly.

        8. -
        9. Append browsingContext to opener's - top-level browsing context's group.

        10. +
        11. Let browsingContext be the result of creating a new browsing + context with opener's active document and group.

        12. + +
        13. Append browsingContext to + group.

        14. Set browsingContext's opener browsing context to opener.

        15. @@ -78146,7 +78161,8 @@ dictionary DragEventInit : MouseEventInit {
          1. Let browsingContext be the result of creating a new browsing - context with element's node document.

          2. + context with element's node document, and element's + top-level browsing context's group.

          3. Set element's nested browsing context to browsingContext.

          4. @@ -78623,8 +78639,11 @@ console.assert(iframeWindow.frameElement === null);
          5. Append group to the user agent's browsing context group set.

          6. -
          7. Append the result of creating a new browsing - context with null to group.

          8. +
          9. Let browsingContext be the result of creating a new browsing + context with null and group.

          10. + +
          11. Append browsingContext to + group.

          12. Return group.

          @@ -83698,11 +83717,20 @@ interface Location { // but see also obtaining a similar-origin window agent given + origin and browsingContext's group.

          +
        16. 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:

            - -
              -
            1. -

              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.

              -
            2. - -
            3. Let originA be A's relevant settings object's origin and originB be B's - relevant settings object's origin.

            4. +

              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.

              -
            5. If originA is same origin with originB, then return - true.

            6. - -
            7. If originA or originB is not a tuple origin, then return false.

            8. - -
            9. If originA's scheme is not - originB's scheme, then return - false.

            10. - -
            11. If originA's host is same - site with originB's host, then return - true.

            12. - -
            13. Return false.

            14. -
            - -

            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.

            -
            -
            Similar-origin window agent
            -
            -

            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.

            -
            -
            Dedicated worker agent

            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:

            + +
              +
            1. If origin is an opaque origin, then + return origin.

            2. + +
            3. If origin's host's registrable domain is null, then return + origin.

            4. + +
            5. Return (origin's scheme, + origin's registrable domain).

            6. +
            + +

            To obtain a similar-origin window agent, + given an origin origin and browsing context group + group, run these steps:

            + +
              +
            1. Let clusterKey be the result of obtaining an agent cluster key given + origin.

            2. + +
            3. Let agentCluster be the result of obtaining a browsing context agent cluster with + group and clusterKey.

            4. + +
            5. Return agentCluster's similar-origin window agent.

            6. +
            + +

            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:

            + +
              +
            1. +

              If group's agent cluster map[key] does not exist:

              +
                +
              1. Let agentCluster be a new agent cluster.

              2. +
              3. Set agentCluster's similar-origin window agent be a new + similar-origin window agent.

              4. +
              5. Set group's agent cluster map[key] to + agentCluster.

              6. +
              +
            2. + +
            3. Return group's agent cluster map[key].

            4. +
            +

            Conceptually, the agent cluster concept is an architecture-independent, idealized "process boundary" that groups together multiple "threads" (agents). The agent clusters