Skip to content

Commit 2c08515

Browse files
authored
Editorial: add <div algorithm> wrappers to API section
Related to: whatwg#1526.
1 parent 0d897b8 commit 2c08515

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

fetch.bs

+16
Original file line numberDiff line numberDiff line change
@@ -8084,6 +8084,7 @@ enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredire
80848084

80858085
<hr>
80868086

8087+
<div algorithm>
80878088
<p>To <dfn export for=Response lt=create|creating>create</dfn> a {{Response}} object, given a
80888089
<a for=/>response</a> <var>response</var>, <a for=/>headers guard</a> <var>guard</var>, and
80898090
<a>realm</a> <var>realm</var>, run these steps:
@@ -8101,7 +8102,9 @@ enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredire
81018102

81028103
<li><p>Return <var>responseObject</var>.
81038104
</ol>
8105+
</div>
81048106

8107+
<div algorithm>
81058108
<p>To <dfn>initialize a response</dfn>, given a {{Response}} object <var>response</var>,
81068109
{{ResponseInit}} <var>init</var>, and an optional <a for=/>body with type</a> <var>body</var>, run
81078110
these steps:
@@ -8144,9 +8147,11 @@ these steps:
81448147
<a for=response>header list</a>.
81458148
</ol>
81468149
</ol>
8150+
</div>
81478151

81488152
<hr>
81498153

8154+
<div algorithm>
81508155
<p>The
81518156
<dfn constructor for=Response id=dom-response lt="Response(body, init)"><code>new Response(<var>body</var>, <var>init</var>)</code></dfn>
81528157
constructor steps are:
@@ -8167,11 +8172,13 @@ constructor steps are:
81678172
<li><p>Perform <a>initialize a response</a> given <a>this</a>, <var>init</var>, and
81688173
<var>bodyWithType</var>.
81698174
</ol>
8175+
</div>
81708176

81718177
<p>The static <dfn method for=Response><code>error()</code></dfn> method steps are to return the
81728178
result of <a for=Response>creating</a> a {{Response}} object, given a new <a>network error</a>,
81738179
"<code>immutable</code>", and <a>this</a>'s <a>relevant Realm</a>.
81748180

8181+
<div algorithm>
81758182
<p>The static
81768183
<dfn method for=Response><code>redirect(<var>url</var>, <var>status</var>)</code></dfn> method steps
81778184
are:
@@ -8199,8 +8206,10 @@ are:
81998206

82008207
<li><p>Return <var>responseObject</var>.
82018208
</ol>
8209+
</div>
82028210

82038211

8212+
<div algorithm>
82048213
<p>The static
82058214
<dfn method for=Response><code>json(<var>data</var>, <var>init</var>)</code></dfn> method steps
82068215
are:
@@ -8220,6 +8229,7 @@ are:
82208229

82218230
<li><p>Return <var>responseObject</var>.
82228231
</ol>
8232+
</div>
82238233

82248234
<p>The <dfn attribute for=Response><code>type</code></dfn> getter steps are to return <a>this</a>'s
82258235
<a for=Response>response</a>'s <a for=response>type</a>.
@@ -8253,6 +8263,7 @@ otherwise false.
82538263

82548264
<hr>
82558265

8266+
<div algorithm>
82568267
<p>The <dfn method for=Response><code>clone()</code></dfn> method steps are:
82578268

82588269
<ol>
@@ -8265,6 +8276,7 @@ otherwise false.
82658276
<var>clonedResponse</var>, <a>this</a>'s <a for=Response>headers</a>'s <a for=Headers>guard</a>,
82668277
and <a>this</a>'s <a>relevant Realm</a>.
82678278
</ol>
8279+
</div>
82688280

82698281

82708282
<h3 id=fetch-method>Fetch method</h3>
@@ -8275,6 +8287,7 @@ partial interface mixin WindowOrWorkerGlobalScope {
82758287
};
82768288
</pre>
82778289

8290+
<div algorithm>
82788291
<p>The
82798292
<dfn id=dom-global-fetch method for=WindowOrWorkerGlobalScope><code>fetch(<var>input</var>, <var>init</var>)</code></dfn>
82808293
method steps are:
@@ -8375,7 +8388,9 @@ method steps are:
83758388

83768389
<li><p>Return <var>p</var>.
83778390
</ol>
8391+
</div>
83788392

8393+
<div algorithm>
83798394
<p>To <dfn lt="Abort the fetch() call" export id=abort-fetch>abort a <code>fetch()</code> call</dfn>
83808395
with a <var>promise</var>, <var>request</var>, <var>responseObject</var>, and an <var>error</var>:
83818396

@@ -8401,6 +8416,7 @@ with a <var>promise</var>, <var>request</var>, <var>responseObject</var>, and an
84018416
<a for=ReadableStream>readable</a>, then <a for=ReadableStream>error</a> <var>response</var>'s
84028417
<a for=response>body</a> with <var>error</var>.
84038418
</ol>
8419+
</div>
84048420

84058421

84068422
<h3 id=garbage-collection>Garbage collection</h3>

0 commit comments

Comments
 (0)