Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ exposes most of the networking functionality at a fairly low level of abstractio

<p>This specification uses terminology from <cite>ABNF</cite>, <cite>Encoding</cite>,
<cite>HTML</cite>, <cite>HTTP</cite>, <cite>MIME Sniffing</cite>, <cite>Streams</cite>,
<cite>URL</cite>, <cite>Web IDL</cite>, and <cite>WebSockets</cite>.
<cite>URL</cite>, <cite>Web IDL</cite>, <cite>WebSockets</cite>, and <cite>WebTransport</cite>.
[[!ABNF]]
[[!ENCODING]]
[[!HTML]]
Expand All @@ -193,6 +193,7 @@ exposes most of the networking functionality at a fairly low level of abstractio
[[!URL]]
[[!WEBIDL]]
[[!WEBSOCKETS]]
[[!WEBTRANSPORT]]

<p><dfn>ABNF</dfn> means ABNF as augmented by HTTP (in particular the addition of <code>#</code>)
and RFC 7405. [[!RFC7405]]
Expand Down Expand Up @@ -1889,7 +1890,7 @@ not always relevant and might require different behavior.
<td><code>navigator.sendBeacon()</code>, {{EventSource}},
HTML's <code>&lt;a ping=""></code> and <code>&lt;area ping=""></code>,
<a method><code>fetch()</code></a>, <a method><code>fetchLater()</code></a>, {{XMLHttpRequest}},
{{WebSocket}}, Cache API
{{WebSocket}}, {{WebTransport}}, Cache API
<tr>
<td>"<code>object</code>"
<td><code>object-src</code>
Expand Down Expand Up @@ -2045,8 +2046,8 @@ during <a lt=fetch for=/>fetching</a>. It provides a convenient way for standard
<p>A <a for=/>request</a> has an associated
<dfn export for=request id=concept-request-mode>mode</dfn>, which is
"<code>same-origin</code>", "<code>cors</code>", "<code>no-cors</code>",
"<code>navigate</code>", or "<code>websocket</code>". Unless stated otherwise, it is
"<code>no-cors</code>".
"<code>navigate</code>", "<code>websocket</code>", or "<code>webtransport</code>".
Unless stated otherwise, it is "<code>no-cors</code>".

<div class=note>
<dl>
Expand All @@ -2071,6 +2072,9 @@ during <a lt=fetch for=/>fetching</a>. It provides a convenient way for standard
<dt>"<code>websocket</code>"
<dd>This is a special mode used only when
<a spec=websockets lt="establish a WebSocket connection">establishing a WebSocket connection</a>.

<dt>"<code>webtransport</code>"
<dd>This is a special mode used only by {{WebTransport/WebTransport(url, options)}}.
</dl>

<p>Even though the default <a for=/>request</a> <a for=request>mode</a> is "<code>no-cors</code>",
Expand Down Expand Up @@ -3581,7 +3585,7 @@ given a <a for=/>request</a> <var>request</var>, run these steps:
with <var>request</var>.

<li><p>If <var>request</var>'s <a for=request>response tainting</a> is "<code>cors</code>" or
<var>request</var>'s <a for=request>mode</a> is "<code>websocket</code>", then
<var>request</var>'s <a for=request>mode</a> is either "<code>websocket</code>" or "<code>webtransport</code>", then
<a for="header list">append</a> (`<code>Origin</code>`, <var>serializedOrigin</var>) to
<var>request</var>'s <a for=request>header list</a>.

Expand Down Expand Up @@ -4841,7 +4845,7 @@ steps:
<dt><var>request</var>'s <a for=request>current URL</a>'s <a for=url>scheme</a> is
"<code>data</code>"
<dt><var>request</var>'s <a for=request>mode</a> is
"<code>navigate</code>" or "<code>websocket</code>"
"<code>navigate</code>", "<code>websocket</code>" or "<code>webtransport</code>"
<dd>
<ol>
<li><p>Set <var>request</var>'s
Expand Down Expand Up @@ -6424,6 +6428,10 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
<a lt="obtain a WebSocket connection">obtaining a WebSocket connection</a>, given
<var>request</var>'s <a for=request>current URL</a>.

<dt>"<code>webtransport</code>"
<dd><p>Let <var>connection</var> be the result of <a>obtaining a WebTransport connection</a>,
given <var>networkPartitionKey</var> and <var>request</var>.

<dt>Otherwise
<dd><p>Let <var>connection</var> be the result of
<a lt="obtain a connection">obtaining a connection</a>, given <var>networkPartitionKey</var>,
Expand Down Expand Up @@ -8325,8 +8333,9 @@ enum RequestPriority { "high", "low", "auto" };

<p class=note>"<code>serviceworker</code>" is omitted from
<a enum><code>RequestDestination</code></a> as it cannot be observed from JavaScript. Implementations
will still need to support it as a <a for=request>destination</a>. "<code>websocket</code>" is
omitted from <a enum><code>RequestMode</code></a> as it cannot be used nor observed from JavaScript.
will still need to support it as a <a for=request>destination</a>. "<code>websocket</code>" and
"<code>webtransport</code>" are omitted from <a enum><code>RequestMode</code></a> as they cannot be
used or observed from JavaScript.

<p>A {{Request}} object has an associated
<dfn id=concept-request-request for=Request export>request</dfn> (a <a for=/>request</a>).
Expand Down