From 4fd4ffc574ff51abaa8a5db2cdbdd0bf158a2519 Mon Sep 17 00:00:00 2001
From: Jungkee Song The following terms are defined in Service Workers: When the user agent is required to set up a browsing context environment settings
- object, given a JavaScript execution context execution context, it
- must run the following steps:Origin
` header
-
@@ -3884,6 +3890,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
ServiceWorkerContainer
interfaceServiceWorkerContainer
interface
@@ -77145,8 +77152,9 @@ console.assert(iframeWindow.frameElement === null);
Script settings for browsing contexts
Let realm be the value of execution context's Realm @@ -77172,7 +77180,6 @@ console.assert(iframeWindow.frameElement === null); -
Return url.
- -If reserved environment is given, then:
+ +Set settings object's id to + reserved environment's id, + settings object's creation + URL to reserved environment's creation URL, settings object's + target browsing context to + reserved environment's target browsing context, and + settings object's active + service worker to reserved environment's active service worker.
Set reserved environment's id to + the empty string.
+ +The identity of the reserved environment is considered to be fully + transferred to the created environment settings object. The reserved environment + is not searchable by the environment’s id from this point on.
+Otherwise, set settings object's id to a new unique opaque string, settings + object's creation URL to + url, settings object's target browsing context to null, and + settings object's active + service worker to null.
Set realm's [[HostDefined]] field to settings object.
Return settings object.
Set request's client to
sourceBrowsingContext's active document's relevant settings
- object, target browsing
- context to browsingContext, destination to "document
",
- mode to "navigate
", credentials mode to "include
", use-URL-credentials flag, and redirect mode to "manual
".
document
", mode to "navigate
", credentials
+ mode to "include
", use-URL-credentials flag, redirect mode to "manual
",
+ and target client id to
+ browsingContext's active document's relevant settings
+ object's id.
Set request's omit-Origin
-header flag.
@@ -81288,6 +81324,23 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O
data-x="concept-request-origin">origin to that browsing context scope origin
and unset request's omit-Origin
-header flag.
Create a new environment reservedEnvironment, and set its id to a new unique opaque string, its creation URL to request's + url, and its target + browsing context to browsingContext.
+ +The created environment's active service worker is set in the + handle fetch algorithm during the fetch if its + creation URL matches a service worker + registration.
+Set request's reserved + client to reservedEnvironment.
If the Should navigation request of type from source in target be blocked by Content
Security Policy? algorithm returns "Blocked
" when executed upon
@@ -81400,15 +81453,15 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON O
Run process a navigate response given request, - response, navigationType, the source browsing context, and - browsingContext.
To process a navigate response, given a request request, a response response, a string type, and two - browsing contexts source and browsingContext, run these - steps:
+ data-x="concept-response">response response, a string type, two + browsing contexts source and browsingContext, and an optional + environment reservedEnvironment, run these steps:Let window be null.
Let settingsObject be null.
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 set window to the
- Window
object of that Document
.
Window
object of that Document
, and set settingsObject to
+ window's relevant settings object.Otherwise,
@@ -81563,7 +81619,8 @@ State: <OUTPUT NAME=I>1</OUTPUT> <INPUT VALUE="Increment" TYPE=BUTTON OSet up a browsing context environment settings object with realm - execution context.
Implement the sandboxing for the Document
.
If settingsObject's active service worker is not null, + then:
+ +If settingsObject is a secure context, + then:
If browsingContext has an opener browsing context and + request's client is a non-secure context, then disown browsingContext's opener.
Otherwise, set settingsObject's active service worker to + null.
An environment settings object specifies algorithms for obtaining the - following:
+An environment is an object that identifies the settings of a + current or potential execution environment. An environment has the following + fields:
+ +An opaque string that uniquely identifies the environment.
An absolute URL that represents the location of the resource with which the + environment is associated.
+ +In the case of an environment settings object, this URL might be
+ distinct from the environment settings object's responsible
+ document's URL, due to mechanisms such as
+ history.pushState()
.
Null or a target browsing context for a navigation request.
Null or a service worker that controls the environment.
An environment settings object is an environment that + additionally specifies algorithms for:
An absolute URL representing the location of the resource with which the
- environment settings object is associated. Note that this URL might be distinct
- from the responsible document's URL, due
- to mechanisms such as history.pushState()
.
An HTTPS state value representing the security properties of the network @@ -96025,6 +96126,9 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope { data-x="fetching-scripts-is-top-level">is top-level flag is set:
Fetch request, and asynchronously wait to run the remaining steps as part of fetch's process response for the response response.
Return worker global scope's url.
- -Set settings object's id to a new + unique opaque string, settings object's creation URL to worker global + scope's url, settings object's target browsing context to null, and + settings object's active + service worker to null.
Set realm's [[HostDefined]] field to settings object.
Return settings object.