Skip to content

Commit 1fbc40c

Browse files
Add duplex property to Request
Oversight of #1457. Tests: web-platform-tests/wpt#36051 & web-platform-tests/wpt#36048. Closes #1486.
1 parent 2d080d7 commit 1fbc40c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

fetch.bs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6793,6 +6793,7 @@ interface Request {
67936793
readonly attribute boolean isReloadNavigation;
67946794
readonly attribute boolean isHistoryNavigation;
67956795
readonly attribute AbortSignal signal;
6796+
readonly attribute RequestDuplex duplex;
67966797

67976798
[NewObject] Request clone();
67986799
};
@@ -6983,6 +6984,14 @@ object), initially null.
69836984
{{AbortSignal}} object indicating whether or not <var>request</var> has been aborted, and its abort
69846985
event handler.
69856986

6987+
<dt><code><var>request</var> . <a attribute for=Request>duplex</a></code>
6988+
<dd>Returns "<code>half</code>", meaning the fetch will be half-duplex (i.e., the user agent sends
6989+
the entire request before processing the response). In future, it could also return
6990+
"<code>full</code>", meaning the fetch will be full-duplex (i.e., the user agent can process the
6991+
response before sending the entire request) to indicate that the fetch will be full-duplex.
6992+
<span class=note>See <a href="https://github.com/whatwg/fetch/issues/1254">issue #1254</a> for
6993+
defining "<code>full</code>".</span>
6994+
69866995
<dt><code><var>request</var> . <a method for=Request>clone</a>()</code>
69876996
<dd><p>Returns a clone of <var>request</var>.
69886997
</dl>
@@ -7433,6 +7442,9 @@ set; otherwise false.
74337442
<p>The <dfn attribute for=Request><code>signal</code></dfn> getter steps are to return <a>this</a>'s
74347443
<a for="Request">signal</a>.
74357444

7445+
<p>The <dfn attribute for=Request><code>duplex</code></dfn> getter steps are to return
7446+
"<code>half</code>".
7447+
74367448
<hr>
74377449

74387450
<p>The <dfn method for=Request><code>clone()</code></dfn> method steps are:

0 commit comments

Comments
 (0)