Living Standard โ Last Updated 24 August 2026
This section describes features that apply most directly to web browsers. Having said that, except where specified otherwise, the requirements defined in this section do apply to all user agents, whether they are web browsers or not.
Origins are the fundamental currency of the web's security model. Two actors in the web platform that share an origin are assumed to trust each other and to have the same authority. Actors with differing origins are considered potentially hostile versus each other, and are isolated from each other to varying degrees.
For example, if Example Bank's web site, hosted at bank.example.com, tries to examine the DOM of Example Charity's web site, hosted
at charity.example.org, a "SecurityError"
DOMException will be raised.
An origin is one of the following:
An internal value, with no serialization it can be recreated from (it is serialized as
"null" per serialization of an origin), for which the only
meaningful operation is testing for equality.
A tuple consisting of:
Origins can be shared, e.g., among multiple
Document objects. Furthermore, origins are generally
immutable. Only the domain of a tuple origin can be changed, and only through the document.domain API.
The effective domain of an origin origin is computed as follows:
If origin is an opaque origin, then return null.
If origin's domain is non-null, then return origin's domain.
Return origin's host.
The serialization of an origin is the string obtained by applying the following algorithm to the given origin origin:
If origin is an opaque origin,
then return "null".
Otherwise, let result be origin's scheme.
Append "://" to result.
Append origin's host, serialized, to result.
If origin's port is non-null, append a U+003A COLON character (:), and origin's port, serialized, to result.
Return result.
The serialization of ("https", "xn--maraa-rta.example", null, null) is "https://xn--maraa-rta.example".
There used to also be a Unicode serialization of an origin. However, it was never widely adopted.
Two origins, A and B, are said to be same origin if the following algorithm returns true:
If A and B are the same opaque origin, then return true.
If A and B are both tuple origins and their schemes, hosts, and port are identical, then return true.
Return false.
Two origins, A and B, are said to be same origin-domain if the following algorithm returns true:
If A and B are the same opaque origin, then return true.
If A and B are both tuple origins:
If A and B's schemes are identical, and their domains are identical and non-null, then return true.
Otherwise, if A and B are same origin and their domains are both null, return true.
Return false.
| A | B | same origin | same origin-domain |
|---|---|---|---|
("https", "example.org", null, null)
| ("https", "example.org", null, null)
| โ | โ |
("https", "example.org", 314, null)
| ("https", "example.org", 420, null)
| โ | โ |
("https", "example.org", 314, "example.org")
| ("https", "example.org", 420, "example.org")
| โ | โ |
("https", "example.org", null, null)
| ("https", "example.org", null, "example.org")
| โ | โ |
("https", "example.org", null, "example.org")
| ("http", "example.org", null, "example.org")
| โ | โ |
A scheme-and-host is a tuple of a scheme (an ASCII string) and a host (a host).
A site is an opaque origin or a scheme-and-host.
To obtain a site, 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's scheme, origin's host).
Return (origin's scheme, origin's host's registrable domain).
Two sites, A and B, are said to be same site if the following algorithm returns true:
If A and B are the same opaque origin, then return true.
If A or B is an opaque origin, then return false.
If A's and B's scheme values are different, then return false.
If A's and B's host values are not equal, then return false.
Return true.
The serialization of a site is the string obtained by applying the following algorithm to the given site site:
If site is an opaque origin, then
return "null".
Let result be site[0].
Append "://" to result.
Append site[1], serialized, to result.
Return result.
It needs to be clear from context that the serialized value is a site, not an
origin, as there is not necessarily a syntactic difference between the two. For example, the
origin ("https", "shop.example", null, null) and
the site ("https", "shop.example") have the same
serialization: "https://shop.example".
Two origins, A and B, are said to be schemelessly same site if the following algorithm returns true:
If A and B are the same opaque origin, then return true.
If A and B are both tuple origins:
If hostA equals hostB and hostA's registrable domain is null, then return true.
If hostA's registrable domain equals hostB's registrable domain and is non-null, then return true.
Return false.
Two origins, A and B, are said to be same site if the following algorithm returns true:
Let siteA be the result of obtaining a site given A.
Let siteB be the result of obtaining a site given B.
If siteA is same site with siteB, then return true.
Return false.
Unlike the same origin and same origin-domain concepts, for schemelessly same site and same site, the port and domain components are ignored.
For the reasons explained in URL, the same site and schemelessly same site concepts should be avoided when possible, in favor of same origin checks.
Given that wildlife.museum, museum, and com are public suffixes and that example.com is not:
| A | B | schemelessly same site | same site |
|---|---|---|---|
("https", "example.com")
| ("https", "sub.example.com")
| โ | โ |
("https", "example.com")
| ("https", "sub.other.example.com")
| โ | โ |
("https", "example.com")
| ("http", "non-secure.example.com")
| โ | โ |
("https", "r.wildlife.museum")
| ("https", "sub.r.wildlife.museum")
| โ | โ |
("https", "r.wildlife.museum")
| ("https", "sub.other.r.wildlife.museum")
| โ | โ |
("https", "r.wildlife.museum")
| ("https", "other.wildlife.museum")
| โ | โ |
("https", "r.wildlife.museum")
| ("https", "wildlife.museum")
| โ | โ |
("https", "wildlife.museum")
| ("https", "wildlife.museum")
| โ | โ |
("https", "example.com")
| ("https", "example.com.")
| โ | โ |
(Here we have omitted the port and domain components since they are not considered.)
document.domain [ = domain ]Returns the current domain used for security checks.
Can be set to a value that removes subdomains, to change the origin's domain to allow pages on other subdomains of the same domain (if they do the same thing) to access each other. This enables pages on different hosts of a domain to synchronously access each other's DOMs.
In sandboxed iframes, Documents with opaque origins, and Documents without a browsing context, the setter will
throw a "SecurityError" exception. In cases where crossOriginIsolated or originAgentCluster return true, the setter will do
nothing.
Avoid using the document.domain setter. It
undermines the security protections provided by the same-origin policy. This is especially acute
when using shared hosting; for example, if an untrusted third party is able to host an HTTP
server at the same IP address but on a different port, then the same-origin protection that
normally protects two different sites on the same host will fail, as the ports are ignored when
comparing origins after the document.domain setter has
been used.
Because of these security pitfalls, this feature is in the process of being removed from the web platform. (This is a long process that takes many years.)
Instead, use postMessage() or
MessageChannel objects to communicate across origins in a safe manner.
The domain
getter steps are:
Let effectiveDomain be this's origin's effective domain.
If effectiveDomain is null, then return the empty string.
Return effectiveDomain, serialized.
The domain setter steps are:
If this's browsing context is
null, then throw a "SecurityError" DOMException.
If this's active sandboxing flag set has its sandboxed
document.domain browsing context flag set, then
throw a "SecurityError" DOMException.
Let effectiveDomain be this's origin's effective domain.
If effectiveDomain is null, then throw a
"SecurityError" DOMException.
If the given value is not
a registrable domain suffix of and is not equal to effectiveDomain, then throw
a "SecurityError" DOMException.
If the surrounding agent's agent cluster's is origin-keyed is true, then return.
Set this's origin's domain to the result of parsing the given value.
To determine if a scalar value string hostSuffixString is a registrable domain suffix of or is equal to a host originalHost:
If hostSuffixString is the empty string, then return false.
Let hostSuffix be the result of parsing hostSuffixString.
If hostSuffix is failure, then return false.
If hostSuffix does not equal originalHost:
If hostSuffix or originalHost is not a domain, then return false.
This excludes hosts that are IP addresses.
If hostSuffix, prefixed by U+002E (.), does not match the end of originalHost, then return false.
If any of the following are true:
hostSuffix equals hostSuffix's public suffix; or
hostSuffix, prefixed by U+002E (.), matches the end of originalHost's public suffix,
then return false. [URL]
Assert: originalHost's public suffix, prefixed by U+002E (.), matches the end of hostSuffix.
Return true.
| hostSuffixString | originalHost | Outcome of is a registrable domain suffix of or is equal to | Notes |
|---|---|---|---|
"0.0.0.0" | 0.0.0.0 | โ | |
"0x10203" | 0.1.2.3 | โ | |
"[0::1]" | ::1 | โ | |
"example.com" | example.com | โ | |
"example.com" | example.com. | โ | Trailing dot is significant. |
"example.com." | example.com | โ | |
"example.com" | www.example.com | โ | |
"com" | example.com | โ | At the time of writing, com is a public suffix. |
"example" | example | โ | |
"compute.amazonaws.com" | example.compute.amazonaws.com | โ | At the time of writing, *.compute.amazonaws.com is a public suffix. |
"example.compute.amazonaws.com" | www.example.compute.amazonaws.com | โ | |
"amazonaws.com" | www.example.compute.amazonaws.com | โ | |
"amazonaws.com" | test.amazonaws.com | โ | At the time of writing, amazonaws.com is a registrable domain. |
Origin interfaceThe Origin interface represents an
origin, allowing robust same origin and same site
comparisons.
[Exposed=*]
interface Origin {
constructor ();
static Origin from (any value );
readonly attribute boolean opaque ;
boolean isSameOrigin (Origin other );
boolean isSameSite (Origin other );
};
Origin objects have an associated origin, which holds an origin.
Platform objects have an extract an origin operation, which returns null unless otherwise specified.
Objects implementing the Origin interface's
extract an origin steps are to return this's origin.
The new Origin() constructor steps are to set
this's origin to a unique opaque origin.
The static from(value) method steps are:
If value is a platform object:
Let origin be the result of executing value's extract an origin operation.
If origin is not null, then return a new Origin object whose origin is origin.
If value is a string:
Let parsedURL be the result of basic URL parsing value.
If parsedURL is not failure, then return a new Origin object whose origin is set to parsedURL's origin.
Throw a TypeError.
The opaque getter
steps are to return true if this's origin
is an opaque origin; otherwise false.
The isSameOrigin(other) method steps are to
return true if this's origin is
same origin with other's origin; otherwise false.
The isSameSite(other) method steps are to
return true if this's origin is
same site with other's origin;
otherwise false.
window.originAgentClusterReturns true if this Window belongs to an agent cluster which is
origin-keyed, in the manner described in
this section.
A Document delivered over a secure context can request that it be
placed in an origin-keyed agent
cluster, by using the `Origin-Agent-Cluster` HTTP
response header. This header is a structured header
whose value must be a boolean.
[STRUCTURED-FIELDS]
Per the processing model in the create
and initialize a new Document object, values
that are not the structured header boolean
true value (i.e., `?1`) will be ignored.
The consequences of using this header are that the resulting
Document's agent cluster key is its origin, instead of the corresponding site. In terms of observable effects, this means that
attempting to relax the same-origin
restriction using document.domain will instead do
nothing, and it will not be possible to send WebAssembly.Module objects to
cross-origin Documents (even if they are same site). Behind the scenes,
this isolation can allow user agents to allocate implementation-specific resources corresponding
to agent clusters, such as processes or threads, more
efficiently.
Note that within a browsing context group, the
`Origin-Agent-Cluster` header can never cause same-origin Document
objects to end up in different 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.
This means that the originAgentCluster getter can return false, even if the
header is set, if the header was omitted on a previously-loaded same-origin page in the same
browsing context group. Similarly, it can return true even when the header is not
set.
The originAgentCluster getter steps are to return the
surrounding agent's agent cluster's is origin-keyed.
Documents with an opaque
origin can be considered unconditionally origin-keyed; for them the header has no effect,
and the originAgentCluster getter will always return
true.
Similarly, Documents whose agent cluster's cross-origin isolation mode is not "none" are automatically origin-keyed. The
`Origin-Agent-Cluster` header might be useful as an additional hint to
implementations about resource allocation, since the `Cross-Origin-Opener-Policy`
and `Cross-Origin-Embedder-Policy` headers used to achieve cross-origin isolation
are more about ensuring that everything in the same address space opts in to being there. But
adding it would have no additional observable effects on author code.
An opener policy value allows a document which is navigated to in a top-level browsing context to force the creation of a new top-level browsing context, and a corresponding group. The possible values are:
unsafe-none"This is the (current) default and means that the document will occupy the same top-level browsing context as its predecessor, unless that document specified a different opener policy.
same-origin-allow-popups"This forces the creation of a new top-level browsing context for the document, unless its predecessor specified the same opener policy and they are same origin.
same-origin"This behaves the same as "same-origin-allow-popups", with the addition that
any auxiliary browsing context created needs to contain same origin
documents that also have the same opener policy or it will appear closed to the
opener.
same-origin-plus-COEP"This behaves the same as "same-origin", with the
addition that it sets the (new) top-level browsing context's group's cross-origin isolation
mode to one of "logical" or "concrete".
"same-origin-plus-COEP" cannot
be directly set via the `Cross-Origin-Opener-Policy` header, but results from a
combination of setting both `Cross-Origin-Opener-Policy: same-origin` and a
`Cross-Origin-Embedder-Policy` header whose value is compatible with
cross-origin isolation together.
noopener-allow-popups"This forces the creation of a new top-level browsing context for the document, regardless of its predecessor.
While including a noopener-allow-popups value severs the opener
relationship between the document on which it is applied and its opener, it does not create a
robust security boundary between those same-origin documents.
Other risks from same-origin applications include:
Same-origin requests fetching the document's content โ could be mitigated through Fetch Metadata filtering. [FETCHMETADATA]
Same-origin framing - could be mitigated through X-Frame-Options or CSP
frame-ancestors.
JavaScript accessible cookies - can be mitigated by ensuring all cookies are httponly.
localStorage access to sensitive data.
Service worker installation.
postMessage or BroadcastChannel messaging that
exposes sensitive information.
Autofill which may not require user interaction for same-origin documents.
Developers using noopener-allow-popups
need to make sure that their sensitive applications don't rely on client-side features
accessible to other same-origin documents, e.g., localStorage and other client-side storage APIs,
BroadcastChannel and related same-origin communication mechanisms. They also need
to make sure that their server-side endpoints don't return sensitive data to non-navigation
requests, whose response content is accessible to same-origin
documents.
An opener policy consists of:
A value, which is an opener policy value, initially "unsafe-none".
A reporting endpoint, which is string or null, initially null.
A report-only value, which is an opener policy value, initially "unsafe-none".
A report-only reporting endpoint, which is a string or null, initially null.
To match opener policy values, given an opener policy value documentCOOP, an origin documentOrigin, an opener policy value responseCOOP, and an origin responseOrigin:
If documentCOOP is "unsafe-none" and
responseCOOP is "unsafe-none", then return
true.
If documentCOOP is "unsafe-none" or
responseCOOP is "unsafe-none", then return
false.
If documentCOOP is responseCOOP and documentOrigin is same origin with responseOrigin, then return true.
Return false.
Headers/Cross-Origin-Opener-Policy
Support in all current engines.
A Document's cross-origin opener
policy is derived from the `Cross-Origin-Opener-Policy` and `Cross-Origin-Opener-Policy-Report-Only` HTTP response headers.
These headers are structured headers whose value must
be a token. [STRUCTURED-FIELDS]
The valid token values are the opener policy values. The token may also have
attached parameters; of these, the "report-to" parameter can have a valid URL
string identifying an appropriate reporting endpoint. [REPORTING]
Per the processing model described below, user agents will ignore this header if it contains an invalid value. Likewise, user agents will ignore this header if the value cannot be parsed as a token.
To obtain an opener policy given a response response and an environment reservedEnvironment:
Let policy be a new opener policy.
If reservedEnvironment is a non-secure context, then return policy.
Let parsedItem be the result of getting a structured field value
given `Cross-Origin-Opener-Policy` and "item" from
response's header list.
If parsedItem is not null:
If parsedItem[0] is "same-origin":
Let coep be the result of obtaining a cross-origin embedder policy from response and reservedEnvironment.
If coep's value is
compatible with cross-origin isolation, then set policy's value to "same-origin-plus-COEP".
Otherwise, set policy's value to
"same-origin".
If parsedItem[0] is "same-origin-allow-popups", then set
policy's value to "same-origin-allow-popups".
If parsedItem[0] is "noopener-allow-popups", then set
policy's value to "noopener-allow-popups".
If parsedItem[1]["report-to"] exists and it is a string, then set policy's reporting endpoint to
parsedItem[1]["report-to"].
Set parsedItem to the result of getting a structured field value
given `Cross-Origin-Opener-Policy-Report-Only` and "item"
from response's header
list.
If parsedItem is not null:
If parsedItem[0] is "same-origin":
Let coep be the result of obtaining a cross-origin embedder policy from response and reservedEnvironment.
If coep's value is
compatible with cross-origin isolation or coep's report-only value is compatible
with cross-origin isolation, then set policy's report-only value to "same-origin-plus-COEP".
Report only COOP also considers report-only COEP to assign the special
"same-origin-plus-COEP" value. This allows
developers more freedom in the order of deployment of COOP and COEP.
Otherwise, set policy's report-only value to "same-origin".
If parsedItem[0] is "same-origin-allow-popups", then set
policy's report-only value to
"same-origin-allow-popups".
If parsedItem[1]["report-to"] exists and it is a string, then set policy's report-only reporting endpoint to
parsedItem[1]["report-to"].
Return policy.
To check if popup COOP values require a browsing context group switch, given two origins responseOrigin and activeDocumentNavigationOrigin, and two opener policy values responseCOOPValue and activeDocumentCOOPValue:
If responseCOOPValue is "noopener-allow-popups", then return true.
If all of the following are true:
activeDocumentCOOPValue's value is
"same-origin-allow-popups" or
"noopener-allow-popups"; and
responseCOOPValue is "unsafe-none",
then return false.
If the result of matching activeDocumentCOOPValue, activeDocumentNavigationOrigin, responseCOOPValue, and responseOrigin is true, then return false.
Return true.
To check if COOP values require a browsing context group switch, given a boolean isInitialAboutBlank, two origins responseOrigin and activeDocumentNavigationOrigin, and two opener policy values responseCOOPValue and activeDocumentCOOPValue:
If isInitialAboutBlank is true, then return the result of checking if popup COOP values requires a browsing context group switch with responseOrigin, activeDocumentNavigationOrigin, responseCOOPValue, and activeDocumentCOOPValue.
Here we are dealing with a non-popup navigation.
If the result of matching activeDocumentCOOPValue, activeDocumentNavigationOrigin, responseCOOPValue, and responseOrigin is true, then return false.
Return true.
To check if enforcing report-only COOP would require a browsing context group switch, given a boolean isInitialAboutBlank, two origins responseOrigin, activeDocumentNavigationOrigin, and two opener policies responseCOOP and activeDocumentCOOP:
If the result of checking if COOP values require a browsing context group switch given isInitialAboutBlank, responseOrigin, activeDocumentNavigationOrigin, responseCOOP's report-only value, and activeDocumentCOOPReportOnly's report-only value is false, then return false.
Matching report-only policies allows a website to specify the same report-only opener policy on all its pages and not receive violation reports for navigations between these pages.
If the result of checking if COOP values require a browsing context group switch given isInitialAboutBlank, responseOrigin, activeDocumentNavigationOrigin, responseCOOP's value, and activeDocumentCOOPReportOnly's report-only value is true, then return true.
If the result of checking if COOP values require a browsing context group switch given isInitialAboutBlank, responseOrigin, activeDocumentNavigationOrigin, responseCOOP's report-only value, and activeDocumentCOOPReportOnly's value is true, then return true.
Return false.
An opener policy enforcement result is a struct with the following items:
A boolean needs a browsing context group switch, initially false.
A boolean would need a browsing context group switch due to report-only, initially false.
A URL url.
An origin origin.
An opener policy opener policy.
A boolean current context is navigation source, initially false.
To enforce a response's opener policy, given a browsing context browsingContext, a URL responseURL, an origin responseOrigin, an opener policy responseCOOP, an opener policy enforcement result currentCOOPEnforcementResult, and a referrer referrer:
Let newCOOPEnforcementResult be a new opener policy enforcement result with
Let isInitialAboutBlank be browsingContext's active
document's is initial about:blank.
If isInitialAboutBlank is true and browsingContext's initial URL is null, set browsingContext's initial URL to responseURL.
If the result of checking if COOP values require a browsing context group switch given isInitialAboutBlank, currentCOOPEnforcementResult's opener policy's value, currentCOOPEnforcementResult's origin, responseCOOP's value, and responseOrigin is true:
Set newCOOPEnforcementResult's needs a browsing context group switch to true.
If browsingContext's group's browsing context set's size is greater than 1:
Queue a violation report for browsing
context group switch when navigating to a COOP response with responseCOOP,
"enforce", responseURL,
currentCOOPEnforcementResult's url,
currentCOOPEnforcementResult's origin, responseOrigin, and
referrer.
Queue a violation report for browsing
context group switch when navigating away from a COOP response with
currentCOOPEnforcementResult's opener
policy, "enforce", currentCOOPEnforcementResult's
url, responseURL,
currentCOOPEnforcementResult's origin, responseOrigin, and
currentCOOPEnforcementResult's current
context is navigation source.
If the result of checking if enforcing report-only COOP would require a browsing context group switch given isInitialAboutBlank, responseOrigin, currentCOOPEnforcementResult's origin, responseCOOP, and currentCOOPEnforcementResult's opener policy, is true:
Set newCOOPEnforcementResult's would need a browsing context group switch due to report-only to true.
If browsingContext's group's browsing context set's size is greater than 1:
Queue a violation report for browsing
context group switch when navigating to a COOP response with responseCOOP,
"reporting", responseURL,
currentCOOPEnforcementResult's url,
currentCOOPEnforcementResult's origin, responseOrigin, and
referrer.
Queue a violation report for browsing
context group switch when navigating away from a COOP response with
currentCOOPEnforcementResult's opener
policy, "reporting",
currentCOOPEnforcementResult's url,
responseURL, currentCOOPEnforcementResult's origin, responseOrigin, and
currentCOOPEnforcementResult's current
context is navigation source.
Return newCOOPEnforcementResult.
To obtain a browsing context to use for a navigation response, given navigation params navigationParams:
Let browsingContext be navigationParams's navigable's active browsing context.
If browsingContext is not a top-level browsing context, then return browsingContext.
Let coopEnforcementResult be navigationParams's COOP enforcement result.
Let swapGroup be coopEnforcementResult's needs a browsing context group switch.
Let sourceOrigin be browsingContext's active document's origin.
Let destinationOrigin be navigationParams's origin.
If sourceOrigin is not same site with destinationOrigin:
If either of sourceOrigin or destinationOrigin have a scheme that is not an HTTP(S) scheme and the user agent considers it necessary for sourceOrigin and destinationOrigin to be isolated from each other (for implementation-defined reasons), optionally set swapGroup to true.
For example, if a user navigates from about:settings to
https://example.com, the user agent could force a swap.
Issue #10842 tracks settling on an interoperable behavior here, instead of letting this be optional.
If navigationParams's user
involvement is "browser UI", optionally set
swapGroup to true.
Issue #6356 tracks settling on an interoperable behavior here, instead of letting this be optional.
If browsingContext's group's browsing context set's size is 1, optionally set swapGroup to true.
Some implementations swap browsing context groups here for performance reasons.
The check for other contexts that could script this one is not sufficient to prevent differences in behavior that could affect a web page. Even if there are currently no other contexts, the destination page could open a window, then if the user navigates back, the previous page could expect to be able to script the opened window. Doing a swap here would break that use case.
If swapGroup is false:
If coopEnforcementResult's would need a browsing context group switch due to report-only is true, set browsingContext's virtual browsing context group ID to a new unique identifier.
Return browsingContext.
Let newBrowsingContext be the first return value of creating a new top-level browsing context and document.
In this case we are going to perform a browsing context group swap.
browsingContext will not be used by the new Document that we are about
to create. If it is not used by other
Documents either (such as ones in the back/forward cache), then the user agent
might destroy it at this point.
Let navigationCOOP be navigationParams's cross-origin opener policy.
If navigationCOOP's value is "same-origin-plus-COEP", then set
newBrowsingContext's group's cross-origin isolation mode to either "logical" or "concrete". The choice of which is
implementation-defined.
It is difficult on some platforms to provide the security properties required
by the cross-origin
isolated capability. "concrete"
grants access to it and "logical" does
not.
Let sandboxFlags be a clone of navigationParams's final sandboxing flag set.
If sandboxFlags is not empty:
Assert: navigationCOOP's value is
"unsafe-none".
Assert: newBrowsingContext's popup sandboxing flag set is empty.
Set newBrowsingContext's popup sandboxing flag set to sandboxFlags.
Return newBrowsingContext.
An accessor-accessed relationship is an enum that describes the relationship between two browsing contexts between which an access happened. It can take the following values:
The accessor browsing context or one of its ancestors is the opener browsing context of the accessed browsing context's top-level browsing context.
The accessed browsing context or one of its ancestors is the opener browsing context of the accessor browsing context's top-level browsing context.
There is no opener relationship between the accessor browsing context, the accessor browsing context, or any of their ancestors.
To check if an access between two browsing contexts should be reported, given two browsing contexts accessor and accessed, a JavaScript property name P, and an environment settings object environment:
If P is not a cross-origin accessible window property name, then return.
Assert: accessor's active document and accessed's active document are both fully active.
Let accessorTopDocument be accessor's top-level browsing context's active document.
Let accessorInclusiveAncestorOrigins be the list obtained by taking the origin of the active document of each of accessor's active document's inclusive ancestor navigables.
Let accessedTopDocument be accessed's top-level browsing context's active document.
Let accessedInclusiveAncestorOrigins be the list obtained by taking the origin of the active document of each of accessed's active document's inclusive ancestor navigables.
If any of accessorInclusiveAncestorOrigins are not same origin with accessorTopDocument's origin, or if any of accessedInclusiveAncestorOrigins are not same origin with accessedTopDocument's origin, then return.
This avoids leaking information about cross-origin iframes to a top level frame with opener policy reporting.
If accessor's top-level browsing context's virtual browsing context group ID is accessed's top-level browsing context's virtual browsing context group ID, then return.
Let accessorAccessedRelationship be a new accessor-accessed relationship with value none.
If accessed's top-level browsing context's opener browsing context is accessor or is an ancestor of accessor, then set accessorAccessedRelationship to accessor is opener.
If accessor's top-level browsing context's opener browsing context is accessed or is an ancestor of accessed, then set accessorAccessedRelationship to accessor is openee.
Queue violation reports for accesses, given accessorAccessedRelationship, accessorTopDocument's opener policy, accessedTopDocument's opener policy, accessor's active document's URL, accessed's active document's