Skip to content

Commit

Permalink
Add request's reserved client and target client id
Browse files Browse the repository at this point in the history
This patch defines the request's reserved client and the target client
id. The reserved client of a request is set to an environment or an
environment settings object during a navigation or a worker creation
request, respectively. The target client id of a request is set to the
target browsing context's active document's environment settings
object's id during a navigation. The given values are primarily used
to provide the reserved client's id and target client's id to service
workers' fetch event handlers.

This removes the request's target browsing context as the reserved
client provides the same information.

Related issue: w3c/ServiceWorker#870
Related change: whatwg/html#1776
  • Loading branch information
jungkees authored and annevk committed Oct 24, 2016
1 parent 93cf40c commit fb87b70
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 9 deletions.
26 changes: 21 additions & 5 deletions Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<p><a class="logo" href="https://whatwg.org/"><img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-fetch.svg" width="100"></a>
<h1 id="cors">Fetch</h1>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-17-october-2016">Living Standard — Last Updated 17 October 2016</h2>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-24-october-2016">Living Standard — Last Updated 24 October 2016</h2>

<dl>
<dt>Participate:
Expand Down Expand Up @@ -731,6 +731,26 @@ <h4 id="requests"><span class="secno">3.1.5 </span>Requests</h4>
<dfn data-dfn-for="request" data-export="" id="concept-request-client" title="concept-request-client">client</dfn> (null or an
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a>).

<p>A <a href="#concept-request" title="concept-request">request</a> has an associated
<dfn data-dfn-for="request" data-export="" id="concept-request-reserved-client" title="concept-request-reserved-client">reserved client</dfn>
(null, an <a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment">environment</a>, or an
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a>). Unless stated otherwise it is null.

<p class="note no-backref">This is only used by <span>navigation requests</span> and worker
requests, but not service worker requests. It references an
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment">environment</a> for a <a href="#navigation-request">navigation request</a> and an
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a> for a worker request.

<p>A <a href="#concept-request" title="concept-request">request</a> has an associated
<dfn data-dfn-for="request" data-export="" id="concept-request-target-client-id" title="concept-request-target-client-id">target client id</dfn>
(a string). Unless stated otherwise it is the empty string.

<p class="note no-backref">This is only used by <span>navigation requests</span>. It is the
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-id" title="concept-environment-id">id</a> of the
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-target-browsing-context">target browsing context</a>'s
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/browsers.html#active-document">active document</a>'s
<a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object">environment settings object</a>.

<p>A <a href="#concept-request" title="concept-request">request</a> has an associated
<dfn data-dfn-for="request" data-export="" id="concept-request-window" title="concept-request-window">window</dfn>
("<code>no-window</code>", "<code>client</code>", or an
Expand All @@ -745,10 +765,6 @@ <h4 id="requests"><span class="secno">3.1.5 </span>Requests</h4>
explicitly set <a href="#concept-request" title="concept-request">request</a>'s
<a href="#concept-request-window" title="concept-request-window">window</a>.

<p>A <a href="#concept-request" title="concept-request">request</a> has an associated
<dfn data-dfn-for="request" data-export="" id="concept-request-target-browsing-context" title="concept-request-target-browsing-context">target browsing context</dfn>
(null or a <a class="external" data-anolis-spec="html" href="https://html.spec.whatwg.org/multipage/browsers.html#browsing-context">browsing context</a>). Unless stated otherwise it is null.

<p id="keep-alive-flag">A <a href="#concept-request" title="concept-request">request</a> has an associated
<dfn id="keepalive-flag">keepalive flag</dfn>. Unless stated otherwise it is unset.

Expand Down
24 changes: 20 additions & 4 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,26 @@ <h4>Requests</h4>
<dfn title=concept-request-client data-export data-dfn-for=request>client</dfn> (null or an
<span data-anolis-spec=html>environment settings object</span>).

<p>A <span title=concept-request>request</span> has an associated
<dfn title=concept-request-reserved-client data-export data-dfn-for=request>reserved client</dfn>
(null, an <span data-anolis-spec=html>environment</span>, or an
<span data-anolis-spec=html>environment settings object</span>). Unless stated otherwise it is null.

<p class="note no-backref">This is only used by <span>navigation requests</span> and worker
requests, but not service worker requests. It references an
<span data-anolis-spec=html>environment</span> for a <span>navigation request</span> and an
<span data-anolis-spec=html>environment settings object</span> for a worker request.

<p>A <span title=concept-request>request</span> has an associated
<dfn title=concept-request-target-client-id data-export data-dfn-for=request>target client id</dfn>
(a string). Unless stated otherwise it is the empty string.

<p class="note no-backref">This is only used by <span>navigation requests</span>. It is the
<span title=concept-environment-id data-anolis-spec=html>id</span> of the
<span data-anolis-spec=html>target browsing context</span>'s
<span data-anolis-spec=html>active document</span>'s
<span data-anolis-spec=html>environment settings object</span>.

<p>A <span title=concept-request>request</span> has an associated
<dfn title=concept-request-window data-export data-dfn-for=request>window</dfn>
("<code>no-window</code>", "<code>client</code>", or an
Expand All @@ -675,10 +695,6 @@ <h4>Requests</h4>
explicitly set <span title=concept-request>request</span>'s
<span title=concept-request-window>window</span>.

<p>A <span title=concept-request>request</span> has an associated
<dfn title=concept-request-target-browsing-context data-export data-dfn-for=request>target browsing context</dfn>
(null or a <span data-anolis-spec=html>browsing context</span>). Unless stated otherwise it is null.

<p id=keep-alive-flag>A <span title=concept-request>request</span> has an associated
<dfn>keepalive flag</dfn>. Unless stated otherwise it is unset.

Expand Down

0 comments on commit fb87b70

Please sign in to comment.