Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify active service worker inheritance #2080

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 59 additions & 14 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -76716,6 +76716,11 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {

<li><p><span>Set the allow* flags</span> for <var>document</var>.</p></li>

<li><p>If <var>document</var>'s <span>active sandboxing flag set</span> has its <span>sandboxed
origin browsing context flag</span> set, then set <var>document</var>'s <span>relevant settings
object</span>'s <span data-x="concept-environment-active-service-worker">active service
worker</span> to null.</p></li>

<li><p>Set <var>settingsObject</var>'s <span
data-x="concept-environment-execution-ready-flag">execution ready flag</span>.</p></li>

Expand Down Expand Up @@ -77572,6 +77577,9 @@ console.assert(iframeWindow.frameElement === null);
</dl>
</li>

<li><p>Set <var>settings object</var>'s <span
data-x="concept-environment-active-service-worker">active service worker</span> to null.</p></li>

<li>
<p>If <var>reserved environment</var> is given, then:</p>

Expand Down Expand Up @@ -77600,13 +77608,25 @@ console.assert(iframeWindow.frameElement === null);
</ol>
</li>

<li><p>Otherwise, set <var>settings object</var>'s <span
data-x="concept-environment-id">id</span> to a new unique opaque string, <var>settings
object</var>'s <span data-x="concept-environment-creation-url">creation URL</span> to
<var>url</var>, <var>settings object</var>'s <span
data-x="concept-environment-target-browsing-context">target browsing context</span> to null, and
<var>settings object</var>'s <span data-x="concept-environment-active-service-worker">active
service worker</span> to null.</p></li>
<li>
<p>Otherwise:</p>

<ol>
<li><p>Set <var>settings object</var>'s <span data-x="concept-environment-id">id</span> to a
new unique opaque string, <var>settings object</var>'s <span
data-x="concept-environment-creation-url">creation URL</span> to <var>url</var>, and
<var>settings object</var>'s <span data-x="concept-environment-target-browsing-context">target
browsing context</span> to null.</p></li>

<li><p>If <var>window</var>'s <span data-x="concept-document-window">associated
<code>Document</code></span>'s <span>browsing context</span> has a <span>creator browsing
context</span>, then set <var>settings object</var>'s <span
data-x="concept-environment-active-service-worker">active service worker</span> to
<span>creator browsing context</span>'s <span>active document</span>'s <span>relevant settings
object</span>'s <span data-x="concept-environment-active-service-worker">active service
worker</span>.</p></li>
</ol>
</li>

<li><p>Set <var>realm</var>'s [[HostDefined]] field to <var>settings object</var>.</p></li>

Expand Down Expand Up @@ -81905,13 +81925,25 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O

<li><p>Let <var>settingsObject</var> be null.</p></li>

<li><p>If <var>browsingContext</var>'s only entry in its <span>session history</span> is the
<code>about:blank</code> <code>Document</code> that was added when <var>browsingContext</var>
was <span data-x="creating a new browsing context">created</span>, and navigation is occurring
with <span>replacement enabled</span>, and that <code>Document</code> has the <span>same
origin</span> as the new <code>Document</code>, then set <var>window</var> to the
<code>Window</code> object of that <code>Document</code>, and set <var>settingsObject</var> to
<var>window</var>'s <span>relevant settings object</span>.</p></li>
<li>
<p>If <var>browsingContext</var>'s only entry in its <span>session history</span> is the
<code>about:blank</code> <code>Document</code> that was added when <var>browsingContext</var>
was <span data-x="creating a new browsing context">created</span>, and navigation is occurring
with <span>replacement enabled</span>, and that <code>Document</code> has the <span>same
origin</span> as the new <code>Document</code>, then:</p>

<ol>
<li><p>Set <var>window</var> to the <code>Window</code> object of that <code>Document</code>,
and set <var>settingsObject</var> to <var>window</var>'s <span>relevant settings
object</span>.</p></li>

<li><p>If <var>reservedEnvironment</var> is present and the new <code>Document</code> is not
the <code>about:blank</code> <code>Document</code>, set <var>settingsObject</var>'s <span
data-x="concept-environment-active-service-worker">active service worker</span> to
<var>reservedEnvironment</var>'s <span
data-x="concept-environment-active-service-worker">active service worker</span>.</p></li>
</ol>
</li>

<li>
<p>Otherwise,</p>
Expand All @@ -81937,6 +81969,13 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<li><p><span>Set up a browsing context environment settings object</span> with <var>realm
execution context</var> and <var>reservedEnvironment</var>, if present, and set
<var>settingsObject</var> to the result.</p></li>

<li><p>If the new <code>Document</code> is the <code>about:blank</code> <code>Document</code>
and <var>browsingContext</var> has a <span>creator browsing context</span>, then set
<var>settingsObject</var>'s <span data-x="concept-environment-active-service-worker">active
service worker</span> to <span>creator browsing context</span>'s <span>active
document</span>'s <span>relevant settings object</span>'s <span
data-x="concept-environment-active-service-worker">active service worker</span>.</p></li>
</ol>
</li>

Expand Down Expand Up @@ -81979,6 +82018,12 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O

<li><p><span>Set the allow* flags</span> for the <code>Document</code>.</p></li>

<li><p>If the <code>Document</code>'s <span>active sandboxing flag set</span> has its
<span>sandboxed origin browsing context flag</span> set, then set <var>document</var>'s
<span>relevant settings object</span>'s <span
data-x="concept-environment-active-service-worker">active service worker</span> to
null.</p></li>

<li><p>Set <var>settingsObject</var>'s <span
data-x="concept-environment-execution-ready-flag">execution ready flag</span>.</p></li>

Expand Down