Skip to content

Commit cd38eca

Browse files
authored
Meta: disambiguate fetch() from the CSS function with the same name
1 parent 99db8c2 commit cd38eca

File tree

1 file changed

+18
-26
lines changed

1 file changed

+18
-26
lines changed

fetch.bs

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,8 @@ APIs. The Fetch Standard provides a unified architecture for these features so t
128128
all consistent when it comes to various aspects of fetching, such as redirects and the
129129
CORS protocol.
130130

131-
<p>The Fetch Standard also defines the <a><code>fetch()</code></a>
132-
JavaScript API, which exposes most of the networking functionality at a fairly low level
133-
of abstraction.
131+
<p>The Fetch Standard also defines the <a method><code>fetch()</code></a> JavaScript API, which
132+
exposes most of the networking functionality at a fairly low level of abstraction.
134133

135134

136135

@@ -1081,13 +1080,9 @@ unset.
10811080
is unset.
10821081

10831082
<p class="note no-backref">The <a>unsafe-request flag</a> is set by APIs such as
1084-
<a><code>fetch()</code></a> and
1085-
{{XMLHttpRequest}} to ensure a
1086-
<a>CORS-preflight fetch</a> is done based on the supplied
1087-
<a for=request>method</a> and
1088-
<a for=request>header list</a>. It does not free an API from
1089-
outlawing <a>forbidden methods</a> and
1090-
<a>forbidden header names</a>.
1083+
<a method><code>fetch()</code></a> and {{XMLHttpRequest}} to ensure a <a>CORS-preflight fetch</a>
1084+
is done based on the supplied <a for=request>method</a> and <a for=request>header list</a>. It does
1085+
not free an API from outlawing <a>forbidden methods</a> and <a>forbidden header names</a>.
10911086

10921087
<p>A <a for=/>request</a> has an associated
10931088
<dfn export for=request id=concept-request-body>body</dfn> (null, a <a for=/>byte sequence</a>, or a
@@ -1247,9 +1242,9 @@ not always relevant and might require different behavior.
12471242
<tr>
12481243
<td>""
12491244
<td><code>connect-src</code>
1250-
<td><code>navigator.sendBeacon()</code>, <code>EventSource</code>,
1245+
<td><code>navigator.sendBeacon()</code>, {{EventSource}},
12511246
HTML's <code>&lt;a ping=""></code> and <code>&lt;area ping=""></code>,
1252-
<a><code>fetch()</code></a>, <code>XMLHttpRequest</code>, <code>WebSocket</code>, Cache API
1247+
<a method><code>fetch()</code></a>, {{XMLHttpRequest}}, {{WebSocket}}, Cache API
12531248
<tr>
12541249
<td>"<code>object</code>"
12551250
<td><code>object-src</code>
@@ -4491,10 +4486,9 @@ Range Requests</cite>. [[HTTP-RANGE]] However, this is not widely supported by b
44914486
`<code>Accept-Charset</code>`, and
44924487
`<code>Accept-Language</code>` must not be included at this point.
44934488

4494-
<p class="note no-backref">`<code>Accept</code>` and
4495-
`<code>Accept-Language</code>` are already included (unless
4496-
<a><code>fetch()</code></a> is used, which does not include the latter by
4497-
default), and `<code>Accept-Charset</code>` is a waste of bytes. See
4489+
<p class="note no-backref">`<code>Accept</code>` and `<code>Accept-Language</code>` are already
4490+
included (unless <a method><code>fetch()</code></a> is used, which does not include the latter
4491+
by default), and `<code>Accept-Charset</code>` is a waste of bytes. See
44984492
<a>HTTP header layer division</a> for more details.
44994493

45004494
<li>
@@ -5348,15 +5342,13 @@ agent's <a>CORS-preflight cache</a> for which there is a <a>cache entry match</a
53485342

53495343
<h2 id=fetch-api>Fetch API</h2>
53505344

5351-
<p class=no-backref>The <a><code>fetch()</code></a> method is relatively
5352-
low-level API for <a lt=fetch for=/>fetching</a> resources. It covers slightly
5353-
more ground than {{XMLHttpRequest}}, although it is
5354-
currently lacking when it comes to request progression (not response progression).
5345+
<p class=no-backref>The <a method><code>fetch()</code></a> method is relatively low-level API for
5346+
<a lt=fetch for=/>fetching</a> resources. It covers slightly more ground than {{XMLHttpRequest}},
5347+
although it is currently lacking when it comes to request progression (not response progression).
53555348

53565349
<div id=fetch-blob-example class="example no-backref">
5357-
<p>The <a><code>fetch()</code></a> method makes it quite straightforward
5358-
to <a for=/>fetch</a> a resource and extract its contents as a
5359-
{{Blob}}:
5350+
<p>The <a method><code>fetch()</code></a> method makes it quite straightforward to
5351+
<a for=/>fetch</a> a resource and extract its contents as a {{Blob}}:
53605352

53615353
<pre><code class=lang-javascript>
53625354
fetch("/music/pk/altes-kamuffel.flac")
@@ -6413,7 +6405,7 @@ constructor steps are:
64136405

64146406
<li><p>Empty <a>this</a>'s <a for=Request>headers</a>'s <a for=Headers>header list</a>.
64156407

6416-
<li><p>If <var>headers</var> is a <code>Headers</code> object, then <a for=list>for each</a>
6408+
<li><p>If <var>headers</var> is a {{Headers}} object, then <a for=list>for each</a>
64176409
<var>header</var> in its <a for=Headers>header list</a>, <a for=Headers>append</a>
64186410
<var>header</var>'s <a for=header>name</a>/<var>header</var>'s <a for=header>value</a> to
64196411
<a>this</a>'s <a for=Request>headers</a>.
@@ -6900,7 +6892,7 @@ method steps are:
69006892
is not observable through script.
69016893

69026894
<p class="note no-backref">"Observable through script" means observable through
6903-
<a><code>fetch()</code></a>'s arguments and return value. Other ways, such as
6895+
<a method><code>fetch()</code></a>'s arguments and return value. Other ways, such as
69046896
communicating with the server through a side-channel are not included.
69056897

69066898
<p class="note no-backref">The server being able to observe garbage collection has precedent, e.g.,
@@ -7185,7 +7177,7 @@ service worker layer, and network &amp; cache layer.
71857177
`<code>Accept-Encoding</code>`,
71867178
`<code>Host</code>`, and `<code>Referer</code>`, are
71877179
set in the network &amp; cache layer. Developers can set headers either at the API layer
7188-
or in the service worker layer (typically through a <a for=/><code>Request</code></a> object).
7180+
or in the service worker layer (typically through a {{Request}} object).
71897181
Developers have almost no control over
71907182
<a lt="forbidden header name">forbidden headers</a>, but can control
71917183
`<code>Accept</code>` and have the means to constrain and omit

0 commit comments

Comments
 (0)