Skip to content

Commit bd9b4e3

Browse files
yutakahiranoannevk
authored andcommitted
Add Request's isHistoryNavigation
And also a member on the request concept (history-navigation flag) to support this API. See w3c/ServiceWorker#1167 for the discussion that led to this. Tests: web-platform-tests/wpt#10909. Corresponding HTML change: whatwg/html#3674.
1 parent efe088f commit bd9b4e3

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

fetch.bs

+21-3
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,12 @@ Unless stated otherwise, it is unset.
11501150

11511151
<p class="note no-backref">This flag is for exclusive use by HTML's navigate algorithm. [[!HTML]]
11521152

1153+
<p>A <a for=/>request</a> has an associated
1154+
<dfn export for=request id=concept-request-history-navigation-flag>history-navigation flag</dfn>.
1155+
Unless stated otherwise, it is unset.
1156+
1157+
<p class="note no-backref">This flag is for exclusive use by HTML's navigate algorithm. [[!HTML]]
1158+
11531159
<hr>
11541160

11551161
<p>A <a for=/>request</a> has an associated
@@ -4976,6 +4982,7 @@ interface Request {
49764982
readonly attribute DOMString integrity;
49774983
readonly attribute boolean keepalive;
49784984
readonly attribute boolean isReloadNavigation;
4985+
readonly attribute boolean isHistoryNavigation;
49794986
readonly attribute AbortSignal signal;
49804987

49814988
[NewObject] Request clone();
@@ -5136,6 +5143,10 @@ initially a new {{AbortSignal}} object.
51365143
<dt><code><var>request</var> . <a attribute for=Request>isReloadNavigation</a></code>
51375144
<dd>Returns a boolean indicating whether or not <var>request</var> is for a reload navigation.
51385145

5146+
<dt><code><var>request</var> . <a attribute for=Request>isHistoryNavigation</a></code>
5147+
<dd>Returns a boolean indicating whether or not <var>request</var> is for a history
5148+
navigation (a.k.a. back-foward navigation).
5149+
51395150
<dt><code><var>request</var> . <a attribute for=Request>signal</a></code>
51405151
<dd>Returns the signal associated with <var>request</var>, which is an
51415152
{{AbortSignal}} object indicating whether or not <var>request</var> has been aborted, and its abort
@@ -5239,10 +5250,11 @@ constructor must run these steps:
52395250
<a for=request>integrity metadata</a> is
52405251
<var>request</var>'s
52415252
<a for=request>integrity metadata</a>,
5242-
<a>keepalive flag</a> is <var>request</var>'s <a>keepalive flag</a>, and
5253+
<a>keepalive flag</a> is <var>request</var>'s <a>keepalive flag</a>,
52435254
<a for=request>reload-navigation flag</a> is <var>request</var>'s
5244-
<a for=request>reload-navigation flag</a>.
5245-
5255+
<a for=request>reload-navigation flag</a>, and
5256+
<a for=request>history-navigation flag</a> is <var>request</var>'s
5257+
<a for=request>history-navigation flag</a>.
52465258

52475259
<li>
52485260
<p>If any of <var>init</var>'s members are present, then:
@@ -5254,6 +5266,8 @@ constructor must run these steps:
52545266

52555267
<li><p>Unset <var>request</var>'s <a for=request>reload-navigation flag</a>.
52565268

5269+
<li><p>Unset <var>request</var>'s <a for=request>history-navigation flag</a>.
5270+
52575271
<li><p>Set <var>request</var>'s <a for=request>referrer</a> to
52585272
"<code>client</code>"
52595273

@@ -5534,6 +5548,10 @@ is set, and false otherwise.
55345548
invoked, must return true if the <a>context object</a>'s <a for=Request>request</a>'s
55355549
<a for=request>reload-navigation flag</a> is set, and false otherwise.
55365550

5551+
<p>The <dfn attribute for=Request><code>isHistoryNavigation</code></dfn> attribute's getter, when
5552+
invoked, must return true if the <a>context object</a>'s <a for=Request>request</a>'s
5553+
<a for=request>history-navigation flag</a> is set, and false otherwise.
5554+
55375555
<p>The <dfn attribute for=Request><code>signal</code></dfn> attribute's getter must return the
55385556
associated <a for="Request">signal</a>.
55395557

0 commit comments

Comments
 (0)