@@ -2128,6 +2128,11 @@ Unless stated otherwise, it is false.
2128
2128
2129
2129
<p class=note> This is for exclusive use by HTML's navigate algorithm. [[!HTML]]
2130
2130
2131
+ <p> A <a for=/>request</a> has an associated <dfn export for=request>navigation
2132
+ id</dfn> (a string). Unless stated otherwise, it is null.
2133
+
2134
+ <p class=note> This is for exclusive use by HTML's navigate algorithm. [[!HTML]]
2135
+
2131
2136
<p> A <a for=/>request</a> has an associated boolean <dfn export for=request>render-blocking</dfn> .
2132
2137
Unless stated otherwise, it is false.
2133
2138
@@ -2169,6 +2174,15 @@ otherwise, it is unset.
2169
2174
<a for=request>done flag</a> , and <a for=request>timing allow failed flag</a> are used as
2170
2175
bookkeeping details by the <a for=/>fetch</a> algorithm.
2171
2176
2177
+ <p> A <a for=/>request</a> has an associated
2178
+ <dfn export for=request id=concept-request-id>request id</dfn> which is a unique
2179
+ string automatically set when the <a for=/>request</a> is created.
2180
+
2181
+ Note: the [=request/request id=] is used by WebDriver-BiDi. It remains constant
2182
+ across all requests resulting from a redirect of an initial request. When a
2183
+ request is [=request/cloned=] , the created request gets a unique
2184
+ [=request/request id=] . [[!WEBDRIVER-BIDI]]
2185
+
2172
2186
<hr>
2173
2187
2174
2188
<p> A <dfn export>subresource request</dfn> is a <a for=/>request</a>
@@ -2245,7 +2259,10 @@ is to return the result of <a>serializing a request origin</a> with <var>request
2245
2259
2246
2260
<ol>
2247
2261
<li><p> Let <var> newRequest</var> be a copy of <var> request</var> , except for its
2248
- <a for=request>body</a> .
2262
+ <a for=request>body</a> and <a for=request>request id</a> .
2263
+
2264
+ <li><p> Let <var> newRequest's</var> <a for=request>request id</a> be a new
2265
+ unique string.
2249
2266
2250
2267
<li><p> If <var> request</var> 's <a for=request>body</a> is non-null, set <var>newRequest</var>' s
2251
2268
<a for=request>body</a> to the result of <a lt=clone for=body>cloning</a> <var> request</var> 's
@@ -4785,6 +4802,11 @@ steps:
4785
4802
<a for=request>URL</a> , <var> fetchParams</var> 's <a for="fetch params">request</a>' s
4786
4803
<a for=request>initiator type</a> , <var> global</var> , <var> cacheState</var> ,
4787
4804
<var> bodyInfo</var> , and <var> responseStatus</var> .
4805
+
4806
+ <li><p> If <var> response</var> is a <a>network error</a> , run
4807
+ the <a>WebDriver BiDi fetch error</a> steps with <var> request</var> . Otherwise
4808
+ run the <a>WebDriver BiDi response completed</a> steps with
4809
+ <var> request</var> and <var> response</var> .
4788
4810
</ol>
4789
4811
4790
4812
<li>
@@ -5139,6 +5161,13 @@ these steps:
5139
5161
<a>filtered response</a> ; otherwise to <var> response</var> 's
5140
5162
<a for="filtered response">internal response</a> .
5141
5163
5164
+ <!-- Service Workers is responsible for emmitting the WebDriver BiDi
5165
+ request events in this case. That's necessary to ensure that the events are
5166
+ only generated if the service worker will handle the fetch, and to get the
5167
+ correct event ordering in the case of network fallback -->
5168
+ <li><p> Run the [=WebDriver BiDi response started=] steps with
5169
+ <var> request</var> and <var> response</var> .
5170
+
5142
5171
<li>
5143
5172
<p> If one of the following is true
5144
5173
@@ -5673,6 +5702,10 @@ run these steps:
5673
5702
<p class=note> This intentionally does not depend on <var> httpRequest</var> 's
5674
5703
<a for=request>credentials mode</a> .
5675
5704
5705
+ <!-- After this point the request is not further modified before being either
5706
+ retrieved from the cache or sent -->
5707
+ <li><p> Run the <a>WebDriver BiDi before request sent</a> steps with <var> request</var> .
5708
+
5676
5709
<li><p> Set <var> httpCache</var> to the result of <a>determining the HTTP cache partition</a> ,
5677
5710
given <var> httpRequest</var> .
5678
5711
@@ -5768,6 +5801,8 @@ run these steps:
5768
5801
<li><p> <a>If aborted</a> , then return the <a for=/>appropriate network error</a> for
5769
5802
<var> fetchParams</var> .
5770
5803
5804
+ <li><p> If <var> response</var> is not null, run the <a>WebDriver BiDi response
5805
+ started</a> steps with <var> request</var> and <var> response</var> .
5771
5806
5772
5807
<!-- If response is still null, we require a forwarded request. -->
5773
5808
<li>
@@ -6031,6 +6066,9 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
6031
6066
6032
6067
<li><p> Wait until all the HTTP response headers are transmitted.
6033
6068
6069
+ <li><p> Run the [=WebDriver BiDi response started=] steps with
6070
+ |request| and |response|.
6071
+
6034
6072
<li><p> Let <var> status</var> be the HTTP response's status code.
6035
6073
6036
6074
<li>
0 commit comments