GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing html.spec.whatwg.org — HTML Standard
7 Loading web pagesThis 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. 7.1 Supporting concepts7.1.1 OriginsOrigins 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 An origin is one of the following:
Origins can be shared, e.g., among multiple
An origin's equality, given origins A and B, returns true if A and B are same origin; otherwise false. The effective domain of an origin origin is computed as follows:
The serialization of an origin is the string obtained by applying the following algorithm to the given origin origin:
The serialization of (" 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:
Two origins, A and B, are said to be same origin-domain if the following algorithm returns true:
7.1.1.1 SitesA 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:
Two sites, A and B, are said to be same site if the following algorithm returns true:
The serialization of a site is the string obtained by applying the following algorithm to the given site site:
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 (" Two origins, A and B, are said to be schemelessly same site if the following algorithm returns true:
Two origins, A and B, are said to be same site if the following algorithm returns true:
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
(Here we have omitted the port and domain components since they are not considered.) 7.1.1.2 Relaxing the same-origin restriction
Avoid using the 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 The
The
To determine if a scalar value string hostSuffixString is a registrable domain suffix of or is equal to a host originalHost:
7.1.1.3 The
|
| key | value |
|---|---|
| disposition | disposition |
| effectivePolicy | coopValue |
| previousResponseURL | If coopOrigin and previousResponseOrigin are same origin this is the sanitization of previousResponseURL, null otherwise. |
| referrer | serializedReferrer |
| type | "navigation-to-response" |
Queue body as "coop" for coop's reporting endpoint with coopURL.
To queue a violation report for browsing context group switch when navigating away from a COOP response given an opener policy coop, a string disposition, a URL coopURL, a URL nextResponseURL, two origins coopOrigin and nextResponseOrigin, and a boolean isCOOPResponseNavigationSource:
If coop's reporting endpoint is null, return.
Let coopValue be coop's value.
If disposition is "reporting", then set
coopValue to coop's report-only value.
Let body be a new object containing the following properties:
| key | value |
|---|---|
| disposition | disposition |
| effectivePolicy | coopValue |
| nextResponseURL | If coopOrigin and nextResponseOrigin are same origin or isCOOPResponseNavigationSource is true, this is the sanitization of nextResponseURL, null otherwise. |
| type | "navigation-from-response" |
Queue body as "coop" for coop's reporting endpoint with coopURL.
To queue violation reports for accesses, given an accessor-accessed relationship accessorAccessedRelationship, two opener policies accessorCOOP and accessedCOOP, four URLs accessorURL, accessedURL, accessorInitialURL, accessedInitialURL, four origins accessorOrigin, accessedOrigin, accessorCreatorOrigin and accessedCreatorOrigin, two referrers accessorReferrer and accessedReferrer, a string propertyName, and an environment settings object environment:
If accessorAccessedRelationship is accessor is opener:
Queue a violation report for access to an opened window, given accessorCOOP, accessorURL, accessedURL, accessedInitialURL, accessorOrigin, accessedOrigin, accessedCreatorOrigin, propertyName, and environment.
Queue a violation report for access from the opener, given accessedCOOP, accessedURL, accessorURL, accessedOrigin, accessorOrigin, propertyName, and accessedReferrer.
Otherwise, if accessorAccessedRelationship is accessor is openee:
Queue a violation report for access to the opener, given accessorCOOP, accessorURL, accessedURL, accessorOrigin, accessedOrigin, propertyName, accessorReferrer, and environment.
Queue a violation report for access from an opened window, given accessedCOOP, accessedURL, accessorURL, accessorInitialURL, accessedOrigin, accessorOrigin, accessorCreatorOrigin, and propertyName.
Otherwise:
Queue a violation report for access to another window, given accessorCOOP, accessorURL, accessedURL, accessorOrigin, accessedOrigin, propertyName, and environment.
Queue a violation report for access from another window, given accessedCOOP, accessedURL, accessorURL, accessedOrigin, accessorOrigin, and propertyName.
To queue a violation report for access to the opener, given an opener policy coop, two URLs coopURL and openerURL, two origins coopOrigin and openerOrigin, a string propertyName, a referrer referrer, and an environment settings object environment:
If coop's reporting endpoint is null, then return.
Let sourceFile, lineNumber, and columnNumber be the relevant script URL and problematic position which triggered this report.
Let serializedReferrer be an empty string.
If referrer is a URL, set serializedReferrer to the serialization of referrer.
Let body be a new object containing the following properties:
| key | value |
|---|---|
| disposition | "reporting" |
| effectivePolicy | coop's report-only value |
| property | propertyName |
| openerURL | If coopOrigin and openerOrigin are same origin, this is the sanitization of openerURL, null otherwise. |
| referrer | serializedReferrer |
| sourceFile | sourceFile |
| lineNumber | lineNumber |
| columnNumber | columnNumber |
| type | "access-to-opener" |
Queue body as "coop" for coop's reporting endpoint with coopURL and
environment.
To queue a violation report for access to an opened window, given an opener policy coop, three URLs coopURL, openedWindowURL and initialWindowURL, three origins coopOrigin, openedWindowOrigin, and openerInitialOrigin, a string propertyName, and an environment settings object environment:
If coop's reporting endpoint is null, then return.
Let sourceFile, lineNumber, and columnNumber be the relevant script URL and problematic position which triggered this report.
Let body be a new object containing the following properties:
| key | value |
|---|---|
| disposition | "reporting" |
| effectivePolicy | coop's report-only value |
| property | propertyName |
| openedWindowURL | If coopOrigin and openedWindowOrigin are same origin, this is the sanitization of openedWindowURL, null otherwise. |
| openedWindowInitialURL | If coopOrigin and openerInitialOrigin are same origin, this is the sanitization of initialWindowURL, null otherwise. |
| sourceFile | sourceFile |
| lineNumber | lineNumber |
| columnNumber | columnNumber |
| type | "access-to-opener" |
Queue body as "coop"
for coop's reporting endpoint with
coopURL and environment.
To queue a violation report for access to another window, given an opener policy coop, two URLs coopURL and otherURL, two origins coopOrigin and otherOrigin, a string propertyName, and an environment settings object environment:
If coop's reporting endpoint is null, then return.
Let sourceFile, lineNumber, and columnNumber be the relevant script URL and problematic position which triggered this report.
Let body be a new object containing the following properties:
| key | value |
|---|---|
| disposition | "reporting" |
| effectivePolicy | coop's report-only value |
| property | propertyName |
| otherURL | If coopOrigin and otherOrigin are same origin, this is the sanitization of otherURL, null otherwise. |
| sourceFile | sourceFile |
| lineNumber | lineNumber |
| columnNumber | columnNumber |
| type | "access-to-opener" |
Queue body as "coop"
for coop's reporting endpoint with
coopURL and environment.
To queue a violation report for access from the opener, given an opener policy coop, two URLs coopURL and openerURL, two origins coopOrigin and openerOrigin, a string propertyName, and a referrer referrer:
If coop's reporting endpoint is null, return.
Let serializedReferrer be an empty string.
If referrer is a URL, set serializedReferrer to the serialization of referrer.
Let body be a new object containing the following properties:
| key | value |
|---|---|
| disposition | "reporting" |
| effectivePolicy | coop's report-only value |
| property | propertyName |
| openerURL | If coopOrigin and openerOrigin are same origin, this is the sanitization of openerURL, null otherwise. |
| referrer | serializedReferrer |
| type | "access-to-opener" |
Queue body as "coop"
for coop's reporting endpoint with
coopURL.
To queue a violation report for access from an opened window, given an opener policy coop, three URLs coopURL, openedWindowURL and initialWindowURL, three origins coopOrigin, openedWindowOrigin, and openerInitialOrigin, and a string propertyName:
If coop's reporting endpoint is null, return.
Let body be a new object containing the following properties:
| key | value |
|---|---|
| disposition | "reporting" |
| effectivePolicy | coop's report-only value |
| property | propertyName |
| openedWindowURL | If coopOrigin and openedWindowOrigin are same origin, this is the sanitization of openedWindowURL, null otherwise. |
| openedWindowInitialURL | If coopOrigin and openerInitialOrigin are same origin, this is the sanitization of initialWindowURL, null otherwise. |
| type | "access-to-opener" |
Queue body as "coop"
for coop's reporting endpoint with
coopURL.
To queue a violation report for access from another window, given an opener policy coop, two URLs coopURL and otherURL, two origins coopOrigin and otherOrigin, and a string propertyName:
If coop's reporting endpoint is null, return.
Let body be a new object containing the following properties:
| key | value |
|---|---|
| disposition | "reporting" |
| effectivePolicy | coop's report-only value |
| property | propertyName |
| otherURL | If coopOrigin and otherOrigin are same origin, this is the sanitization of otherURL, null otherwise. |
| type | access-to-opener |
Queue body as "coop"
for coop's reporting endpoint with
coopURL.
Headers/Cross-Origin-Embedder-Policy
Support in all current engines.
An embedder policy value is one of three strings that controls the fetching of cross-origin resources without explicit permission from resource owners.
unsafe-none"This is the default value. When this value is used, cross-origin resources can be fetched
without giving explicit permission through the CORS protocol or the
`Cross-Origin-Resource-Policy` header.
require-corp"When this value is used, fetching cross-origin resources requires the server's
explicit permission through the CORS protocol or the
`Cross-Origin-Resource-Policy` header.
credentialless"When this value is used, fetching cross-origin no-CORS resources omits credentials. In
exchange, an explicit `Cross-Origin-Resource-Policy` header is not required. Other
requests sent with credentials require the server's explicit permission through the CORS
protocol or the `Cross-Origin-Resource-Policy` header.
Before supporting "credentialless", implementers are
strongly encouraged to support both:
Otherwise, it would allow attackers to leverage the client's network position to read non public resources, using the cross-origin isolated capability.
An embedder policy value is compatible with cross-origin isolation if
it is "credentialless" or "require-corp".
An embedder policy consists of:
A value, which is an embedder policy value, initially "unsafe-none".
A reporting endpoint string, initially the empty string.
A report-only value, which is an embedder policy value, initially
"unsafe-none".
A report-only reporting endpoint string, initially the empty string.
The "coep" report type is a report type whose value
is "coep". It is visible to
ReportingObservers.
The `Cross-Origin-Embedder-Policy` and
`Cross-Origin-Embedder-Policy-Report-Only` HTTP response
headers allow a server to declare an embedder policy for an environment
settings object. These headers are structured
headers whose values must be a token.
[STRUCTURED-FIELDS]
The valid token values are the embedder policy values. The token may also have attached parameters; of these, the "report-to" parameter can have a string value that is the name of an appropriate endpoint.
[REPORTING]
The processing model fails open (by defaulting
to "unsafe-none") in the presence of a header that cannot
be parsed as a token. This includes inadvertent lists created by combining multiple instances of
the `Cross-Origin-Embedder-Policy` header present in a given response:
`Cross-Origin-Embedder-Policy` | Final embedder policy value |
|---|---|
| No header delivered | "unsafe-none" |
`require-corp` | "require-corp" |
`unknown-value` | "unsafe-none" |
`require-corp, unknown-value` | "unsafe-none" |
`unknown-value, unknown-value` | "unsafe-none" |
`unknown-value, require-corp` | "unsafe-none" |
`require-corp, require-corp` | "unsafe-none" |
(The same applies to `Cross-Origin-Embedder-Policy-Report-Only`.)
To obtain an embedder policy from a response response and an environment environment:
Let policy be a new embedder policy.
If environment is a non-secure context, then return policy.
Let parsedItem be the result of getting a structured field value
with `Cross-Origin-Embedder-Policy` and "item" from
response's header list.
If parsedItem is non-null, parsedItem[0] is a token, and parsedItem[0] is compatible with cross-origin isolation:
Set parsedItem to the result of getting a structured field value
with `Cross-Origin-Embedder-Policy-Report-Only` and "item"
from response's header
list.
If parsedItem is non-null, parsedItem[0] is a token, and parsedItem[0] is compatible with cross-origin isolation:
Set policy's report-only value to parsedItem[0].
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 a navigation response's adherence to its embedder policy given a response response, a navigable navigable, and an embedder policy responsePolicy:
If navigable is not a child navigable, then return true.
Let parentPolicy be navigable's container document's policy container's embedder policy.
If parentPolicy's report-only
value is compatible with cross-origin isolation and
responsePolicy's value is not, then
queue a cross-origin embedder policy inheritance violation with response,
"navigation", parentPolicy's report-only reporting endpoint,
"reporting", and navigable's container document's relevant settings
object.
If parentPolicy's value is not compatible with cross-origin isolation or responsePolicy's value is compatible with cross-origin isolation, then return true.
Queue a cross-origin embedder policy inheritance violation with
response, "navigation", parentPolicy's reporting endpoint,
"enforce", and navigable's
container document's relevant settings
object.
Return false.
To check a global object's embedder policy given a WorkerGlobalScope
workerGlobalScope, an environment settings object owner, and
a response response:
If workerGlobalScope is not a DedicatedWorkerGlobalScope object,
then return true.
Let policy be workerGlobalScope's embedder policy.
Let ownerPolicy be owner's policy container's embedder policy.
If ownerPolicy's report-only
value is compatible with cross-origin isolation and policy's
value is not, then queue a cross-origin
embedder policy inheritance violation with response, "worker
initialization", ownerPolicy's report-only reporting endpoint,
"reporting", and owner.
If ownerPolicy's value is not compatible with cross-origin isolation or policy's value is compatible with cross-origin isolation, then return true.
Queue a cross-origin embedder policy inheritance violation with
response, "worker initialization", ownerPolicy's
reporting endpoint,
"enforce", and owner.
Return false.
To queue a cross-origin embedder policy inheritance violation given a response response, a string type, a string endpoint, a string disposition, and an environment settings object settings:
Let serialized be the result of serializing a response URL for reporting with response.
Let body be a new object containing the following properties:
| key | value |
|---|---|
| type | type |
| blockedURL | serialized |
| disposition | disposition |
Queue body as the
"coep" report type for endpoint on settings.
A sandboxing flag set is a set of zero or more of the following flags, which are used to restrict the abilities that potentially untrusted resources have:
This flag prevents content from navigating browsing contexts other than the sandboxed browsing context itself (or browsing contexts further nested inside it), auxiliary browsing contexts (which are protected by the sandboxed auxiliary navigation browsing context flag defined next), and the top-level browsing context (which is protected by the sandboxed top-level navigation without user activation browsing context flag and sandboxed top-level navigation with user activation browsing context flag defined below).
If the sandboxed auxiliary navigation browsing context flag is not set, then in certain cases the restrictions nonetheless allow popups (new top-level browsing contexts) to be opened. These browsing contexts always have one permitted sandboxed navigator, set when the browsing context is created, which allows the browsing context that created them to actually navigate them. (Otherwise, the sandboxed navigation browsing context flag would prevent them from being navigated even if they were opened.)
This flag prevents content from creating new auxiliary browsing
contexts, e.g. using the target attribute or
the window.open() method.
This flag prevents content from navigating their top-level browsing context and prevents content from closing their top-level browsing context. It is consulted only when the sandboxed browsing context's active window does not have transient activation.
When the sandboxed top-level navigation without user activation browsing context flag is not set, content can navigate its top-level browsing context, but other browsing contexts are still protected by the sandboxed navigation browsing context flag and possibly the sandboxed auxiliary navigation browsing context flag.
This flag prevents content from navigating their top-level browsing context and prevents content from closing their top-level browsing context. It is consulted only when the sandboxed browsing context's active window has transient activation.
As with the sandboxed top-level navigation without user activation browsing context flag, this flag only affects the top-level browsing context; if it is not set, other browsing contexts might still be protected by other flags.
This flag forces content into an opaque origin, thus preventing it from accessing other content from the same origin.
This flag also prevents script from reading from or writing to the
document.cookie IDL attribute, and blocks access
to localStorage.
This flag blocks form submission.
This flag disables the Pointer Lock API. [POINTERLOCK]
This flag blocks script execution.
This flag blocks features that trigger automatically, such as automatically playing a video or automatically focusing a form control.
document.domain
browsing context flagThis flag prevents content from using the
document.domain setter.
This flag prevents content from escaping the sandbox by ensuring that any auxiliary browsing context it creates inherits the content's active sandboxing flag set.
This flag prevents content from using any of the following features to produce modal dialogs:
This flag disables the ability to lock the screen orientation. [SCREENORIENTATION]
This flag disables the Presentation API. [PRESENTATION]
This flag prevents content from initiating or instantiating downloads, whether through downloading hyperlinks or through navigation that gets handled as a download.
This flag prevents navigations toward non fetch schemes from being handed off to external software.
When the user agent is to parse a sandboxing directive, given a string input and a sandboxing flag set output, it must run the following steps:
Split input on ASCII whitespace, to obtain tokens.
Let output be empty.
Add the following flags to output:
The sandboxed auxiliary navigation browsing context flag, unless
tokens contains the allow-popups keyword.
The sandboxed top-level navigation without user activation browsing context
flag, unless tokens contains the allow-top-navigation
keyword.
The sandboxed top-level navigation with user activation browsing context flag,
unless tokens contains either the allow-top-navigation-by-user-activation
keyword or the allow-top-navigation keyword.
This means that if the allow-top-navigation is present, the allow-top-navigation-by-user-activation
keyword will have no effect. For this reason, specifying both is a document conformance error.
The sandboxed origin browsing context flag, unless the tokens
contains the allow-same-origin keyword.
The allow-same-origin keyword
is intended for two cases.
First, it can be used to allow content from the same site to be sandboxed to disable scripting, while still allowing access to the DOM of the sandboxed content.
Second, it can be used to embed content from a third-party site, sandboxed to prevent that site from opening popups, etc, without preventing the embedded page from communicating back to its originating site, using the database APIs to store data, etc.
The sandboxed forms browsing context flag, unless tokens
contains the allow-forms keyword.
The sandboxed pointer lock browsing context flag, unless tokens
contains the allow-pointer-lock
keyword.
The sandboxed scripts browsing context flag, unless tokens
contains the allow-scripts keyword.
The sandboxed automatic features browsing context flag, unless
tokens contains the allow-scripts keyword (defined above).
This flag is relaxed by the same keyword as scripts, because when scripts are enabled these features are trivially possible anyway, and it would be unfortunate to force authors to use script to do them when sandboxed rather than allowing them to use the declarative features.
The sandbox propagates to auxiliary browsing contexts flag, unless
tokens contains the allow-popups-to-escape-sandbox
keyword.
The sandboxed modals flag, unless tokens contains the allow-modals keyword.
The sandboxed orientation lock browsing context flag, unless
tokens contains the allow-orientation-lock
keyword.
The sandboxed presentation browsing context flag, unless tokens
contains the allow-presentation
keyword.
The sandboxed downloads browsing context flag, unless tokens
contains the allow-downloads keyword.
The sandboxed custom protocols navigation browsing context flag, unless
tokens contains either the allow-top-navigation-to-custom-protocols
keyword, the allow-popups keyword, or
the allow-top-navigation
keyword.
Every top-level browsing context has a popup sandboxing flag set, which is a sandboxing flag set. When a browsing context is created, its popup sandboxing flag set must be empty. It is populated by the rules for choosing a navigable and the obtain a browsing context to use for a navigation response algorithm.
Every iframe element has an iframe sandboxing flag set,
which is a sandboxing flag set. Which flags in an iframe
sandboxing flag set are set at any particular time is determined by the iframe
element's sandbox attribute.
Every Document has an active sandboxing flag set,
which is a sandboxing flag set. When the Document is created, its
active sandboxing flag set must be empty. It is populated by the navigation algorithm.
Every CSP list cspList has CSP-derived sandboxing flags, which is a sandboxing flag set. It is the return value of the following algorithm:
Let directives be an empty ordered set.
For each policy in cspList:
If policy's disposition is not "enforce", then continue.
If policy's directive set contains a directive whose name is "sandbox",
then append that directive to
directives.
If directives is empty, then return an empty sandboxing flag set.
Let directive be directives[directives's size − 1].
Return the result of parsing the sandboxing directive directive.
To determine the creation sandboxing flags for a browsing context browsing context, given null or an element embedder, return the union of the flags that are present in the following sandboxing flag sets:
If embedder is null, then the flags set on browsing context's popup sandboxing flag set.
If embedder is an element, then the flags set on embedder's
iframe sandboxing flag set.
If embedder is an element, then the flags set on embedder's node document's active sandboxing flag set.
iframe element referrer policyTo determine the
iframe element referrer policy given an element-or-null
embedder:
If embedder is an iframe element, then return
embedder's referrerpolicy attribute's
state's corresponding keyword.
Return the empty string.
This is used for allowing masking of some origins in the internal ancestor origin objects list creation steps.
A policy container is a struct containing policies that apply to
a Document, a WorkerGlobalScope, or a WorkletGlobalScope.
It has the following items:
A CSP list, which is a CSP list. It is initially empty.
An embedder policy, which is an embedder policy. It is initially a new embedder policy.
A referrer policy, which is a referrer policy. It is initially the default referrer policy.
An integrity policy, which is an integrity policy, initially a new integrity policy.
A report-only integrity policy, which is an integrity policy, initially a new integrity policy.
Move other policies into the policy container.
To clone a policy container given a policy container policyContainer:
Let clone be a new policy container.
For each policy in policyContainer's CSP list, append a copy of policy into clone's CSP list.
Set clone's embedder policy to a copy of policyContainer's embedder policy.
Set clone's referrer policy to policyContainer's referrer policy.
Set clone's integrity policy to a copy of policyContainer's integrity policy.
Return clone.
To determine whether a URL url requires storing the policy container in history:
To create a policy container from a fetch response given a response response and an environment-or-null environment:
If response's URL's scheme is "blob", then return a clone of response's URL's blob URL
entry's environment's policy container.
Let result be a new policy container.
Set result's CSP list to the result of parsing a response's Content Security Policies given response.
If environment is non-null, then set result's embedder policy to the result of obtaining an embedder policy given response
and environment. Otherwise, set it to "unsafe-none".
Set result's referrer
policy to the result of parsing the
`Referrer-Policy` header given response.
[REFERRERPOLICY]
Parse Integrity-Policy headers with response and result.
Return result.
To determine navigation params policy container given a URL responseURL and four policy container-or-nulls historyPolicyContainer, initiatorPolicyContainer, parentPolicyContainer, and responsePolicyContainer:
If historyPolicyContainer is not null:
Assert: responseURL requires storing the policy container in history.
Return a clone of historyPolicyContainer.
If responseURL is about:srcdoc:
If responseURL is local and initiatorPolicyContainer is not null, then return a clone of initiatorPolicyContainer.
If responsePolicyContainer is not null, then return responsePolicyContainer.
Return a new policy container.
To initialize a worker global scope's policy
container given a WorkerGlobalScope workerGlobalScope, a response response, and an environment
environment:
If workerGlobalScope's url
is local but its scheme
is not "blob":
Set workerGlobalScope's policy container to a clone of workerGlobalScope's owner set[0]'s relevant settings object's policy container.
Otherwise, set workerGlobalScope's policy container to the result of creating a policy container from a fetch response given response and environment.