From 93ef2db9f29202c4e5579aad26bb48f9e2616673 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Thu, 11 Jun 2020 14:47:01 -0400 Subject: [PATCH] Add window.originIsolated --- source | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/source b/source index f22b0443bec..a68f3c0fe7c 100644 --- a/source +++ b/source @@ -77889,6 +77889,7 @@ interface Window : Eve // the user agent readonly attribute Navigator navigator; [SecureContext] readonly attribute ApplicationCache applicationCache; + readonly attribute boolean originIsolated; // user prompts void alert(); @@ -79627,6 +79628,27 @@ interface BarProp {

Origin isolation

+
+
originIsolated = window . originIsolated
+ +
+

Returns true if this Window's agent cluster key is its + origin, instead of the corresponding + site.

+ +

This can be false, even if the `Origin-Isolation` + HTTP response header was sent, if a non-origin-isolated same-origin Window was + previously seen in the Window's browsing context group.

+ +

This can be true, even if the `Origin-Isolation` + HTTP response header was not sent, if an origin-isolated same-origin Window was + previously seen in the Window's browsing context group. Additionally, + some windows (e.g. those created from resources with an opaque origin) are always origin-isolated, and for them + this getter will always return true.

+
+
+

A Document delivered over a secure context can opt in to origin isolation, by using the `Origin-Isolation` HTTP response header. This header is a @@ -79652,6 +79674,29 @@ interface BarProp { cluster">agent clusters, even if one sends the header and the other doesn't. This is prevented by means of the historical agent cluster key map.

+

Documents for which obtain a site returns an + origin can be considered unconditionally origin isolated; for them, the header has no + effect.

+ +
+ +

The originIsolated getter steps are:

+ +
    +
  1. Let browsingContext be this's browsing + context.

  2. + +
  3. If browsingContext is null, then return false.

  4. + +
  5. Let origin be this's associated Document's + origin.

  6. + +
  7. If browsingContext's group's historical + agent cluster key map[origin] is origin, then return true.

    + +
  8. Return false.

  9. +

Sandboxing