@@ -6792,6 +6792,7 @@ dictionary RequestInit {
6792
6792
DOMString integrity;
6793
6793
boolean keepalive;
6794
6794
AbortSignal? signal;
6795
+ RequestDuplex duplex;
6795
6796
any window; // can only be set to null
6796
6797
};
6797
6798
@@ -6800,6 +6801,7 @@ enum RequestMode { "navigate", "same-origin", "no-cors", "cors" };
6800
6801
enum RequestCredentials { "omit", "same-origin", "include" };
6801
6802
enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" };
6802
6803
enum RequestRedirect { "follow", "error", "manual" };
6804
+ enum RequestDuplex { "half" };
6803
6805
</pre>
6804
6806
6805
6807
<p class="note no-backref"> "<code> serviceworker</code> " is omitted from
@@ -6888,6 +6890,15 @@ object), initially null.
6888
6890
6889
6891
<dt> {{RequestInit/window}}
6890
6892
<dd> Can only be null. Used to disassociate <var> request</var> from any {{Window}} .
6893
+
6894
+ <dt> {{RequestInit/duplex}}
6895
+ <dd> "<code> half</code> " is the only valid value and it is for initiating a half-duplex fetch
6896
+ (i.e., the user agent sends the entire request before processing the response).
6897
+ "<code> full</code> " is reserved for future use, for initiating a full-duplex fetch (i.e., the
6898
+ user agent can process the response before sending the entire request). This member needs to be
6899
+ set when {{RequestInit/body}} is a {{ReadableStream}} object. <span class=note> See
6900
+ <a href="https://github.com/whatwg/fetch/issues/1254">issue #1254</a> for defining
6901
+ "<code> full</code> ".</span>
6891
6902
</dl>
6892
6903
6893
6904
<dt><code><var> request</var> . <a attribute for=Request>method</a> </code>
@@ -7318,6 +7329,9 @@ constructor steps are:
7318
7329
<a for=body>source</a> is null, then:
7319
7330
7320
7331
<ol>
7332
+ <li><p> If <var> initBody</var> is non-null and <var> init</var> ["{{RequestInit/duplex}}"] does
7333
+ not <a for=map>exist</a> , then throw a {{TypeError}} .
7334
+
7321
7335
<li><p> If <a>this</a> 's <a for=Request>request</a>' s <a for=request>mode</a> is neither
7322
7336
"<code> same-origin</code> " nor "<code> cors</code> ", then throw a {{TypeError}} .
7323
7337
0 commit comments