diff --git a/source b/source index 54846cb1d07..697f6616357 100644 --- a/source +++ b/source @@ -4074,8 +4074,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • container policy
  • serialized feature policy
  • default allowlist
  • -
  • The Initialize document’s feature policy algorithm
  • -
  • The Initialize document’s feature policy from response algorithm
  • +
  • The Initialize a document's feature policy algorithm
  • +
  • The Initialize a document's feature policy from a response algorithm
  • The Is feature enabled by policy for origin algorithm
  • The Process feature policy attributes algorithm
  • @@ -77234,8 +77234,8 @@ dictionary DragEventInit : MouseEventInit {
  • Implement the sandboxing for document.

  • -
  • Execute the Initialize document’s Feature Policy algorithm on - document.

  • +
  • Initialize a document's feature policy given document.

  • Add document to browsingContext's session history.

  • @@ -82677,153 +82677,6 @@ interface Location { // but see also Setting the document's address: Any - Document created by these steps must have its URL set to:

    -
    -
    If request is non-null,
    -
    request's current URL
    -
    Otherwise (request is null),
    -
    response's URL
    -
    - -

    Initializing a new Document object: when a - Document is created as part of the above steps, the user agent will be required to - additionally run the following algorithm after creating the new object:

    - -
      -
    1. If browsingContext's only entry in its session history is the - about:blank Document that was added when browsingContext - was created, and navigation is occurring - with replacement enabled, and that Document has the same - origin as the new Document, then do nothing.

    2. - -
    3. -

      Otherwise:

      - -
        -
      1. -

        Let realm execution context be the result of creating a new JavaScript - realm with the following customizations:

        - -
          -
        • For the global object, create a new Window object.

        • - -
        • For the global this binding, use browsingContext's - WindowProxy object.

        • -
        -
      2. - -
      3. Set up a window environment settings object with realm execution - context and reservedEnvironment, if present.

      4. -
      -
    4. - -
    5. Set the Document's HTTPS - state to the HTTPS state of - response.

    6. - -
    7. Set the Document's referrer - policy to the result of parsing the - `Referrer-Policy` header of response.

    8. - -
    9. Run the Initialize a Document's CSP list - algorithm with the Document object, response, and - request, as parameters.

      - -
    10. -

      If request is non-null, then set the document's referrer to the - serialization of request's referrer, if request's referrer is a URL record, and the empty - string otherwise.

      - -

      Per the WHATWG Fetch standard a request's referrer will be either a URL record or - "no-referrer" at this point.

      -
    11. - -
    12. Implement the sandboxing for the Document.

    13. - -
    14. -

      Execute the Initialize document’s Feature Policy from response - algorithm on the Document object and the response used to generate the document.

      - -

      The Initialize document’s Feature Policy from response algorithm - makes use of the Document's origin. If document.domain has been used for the browsing - context container's node document, then its origin cannot be - same origin-domain with document's origin, because these - steps run when document is initialized, so it cannot itself yet have used document.domain. Note that this means that Feature Policy - checks are less permissive compared to doing a same origin check instead.

      - -
      -

      In this example, the child document is not allowed to use PaymentRequest, - despite being same origin-domain at the time the child document tries to use - it. At the time the child document is initialized, only the parent document has set document.domain, and the child document has not.

      - -
      <!-- https://foo.example.com/a.html -->
      -<!doctype html>
      -<script>
      - document.domain = 'example.com';
      -</script>
      -<iframe src=b.html></iframe>
      - -
      <!-- https://bar.example.com/b.html -->
      -<!doctype html>
      -<script>
      - document.domain = 'example.com'; // This happens after the document is initialized
      - new PaymentRequest(…); // Not allowed to use
      -</script>
      -
      - -
      -

      In this example, the child document is allowed to use - PaymentRequest, despite not being same origin-domain at the time - the child document tries to use it. At the time the child document is initialized, none of - the documents have set document.domain yet so - same origin-domain falls back to a normal same origin check.

      - -
      <!-- https://example.com/a.html -->
      -<!doctype html>
      -<iframe src=b.html></iframe>
      -<!-- The child document is now initialized, before the script below is run. -->
      -<script>
      - document.domain = 'example.com';
      -</script>
      - -
      <!-- https://example.com/b.html -->
      -<!doctype html>
      -<script>
      - new PaymentRequest(…); // Allowed to use
      -</script>
      -
      -
    15. - -
    16. -

      If response has a `Refresh` header, then:

      - -
        -
      1. Multiple `Refresh` headers.

      2. - -
      3. Let value be the isomorphic decoding - of the value of the header.

      4. - -
      5. Run the shared declarative refresh steps with the Document - and value.

      6. -
      -
    17. -