Skip to content

Commit 7d951ac

Browse files
authored
Editorial: add <div algorithm> wrappers to some definitions
Helps with #1526.
1 parent 62e5d0b commit 7d951ac

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

fetch.bs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,7 @@ worked on in <a href=https://github.com/whatwg/fetch/issues/1156>issue #1156</a>
13251325
initially null.
13261326
</ul>
13271327

1328+
<div algorithm>
13281329
<p>To <dfn export for=body id=concept-body-clone>clone</dfn> a
13291330
<a for=/>body</a> <var>body</var>, run these steps:
13301331

@@ -1338,13 +1339,17 @@ worked on in <a href=https://github.com/whatwg/fetch/issues/1156>issue #1156</a>
13381339
<a for=body>stream</a> is <var>out2</var> and other members are copied from
13391340
<var>body</var>.
13401341
</ol>
1342+
</div>
13411343

1344+
<div algorithm>
13421345
<p>To get a <a for=/>byte sequence</a> <var>bytes</var>
13431346
<dfn export for="byte sequence">as a body</dfn>, return the <a for="body with type">body</a> of the
13441347
result of <a for=BodyInit>safely extracting</a> <var>bytes</var>.
1348+
</div>
13451349

13461350
<hr>
13471351

1352+
<div algorithm>
13481353
<p>To <dfn export for=body>incrementally read</dfn> a <a for=/>body</a> <var>body</var>, given an
13491354
algorithm <var>processBodyChunk</var>, an algorithm <var>processEndOfBody</var>, an algorithm
13501355
<var>processBodyError</var>, and an optional null, <a for=/>parallel queue</a>, or
@@ -1367,7 +1372,9 @@ must be an algorithm accepting an exception.
13671372
<var>taskDestination</var>, <var>processBodyChunk</var>, <var>processEndOfBody</var>, and
13681373
<var>processBodyError</var>.
13691374
</ol>
1375+
</div>
13701376

1377+
<div algorithm>
13711378
<p>To perform the <dfn>incrementally-read loop</dfn>, given a {{ReadableStreamDefaultReader}} object
13721379
<var>reader</var>, <a for=/>parallel queue</a> or <a for=/>global object</a>
13731380
<var>taskDestination</var>, algorithm <var>processBodyChunk</var>, algorithm
@@ -1426,7 +1433,9 @@ must be an algorithm accepting an exception.
14261433
<li><p><a for=ReadableStreamDefaultReader>Read a chunk</a> from <var>reader</var> given
14271434
<var>readRequest</var>.
14281435
</ol>
1436+
</div>
14291437

1438+
<div algorithm>
14301439
<p>To <dfn export for=body>fully read</dfn> a <a for=/>body</a> <var>body</var>, given an algorithm
14311440
<var>processBody</var>, an algorithm <var>processBodyError</var>, and an optional null,
14321441
<a for=/>parallel queue</a>, or <a for=/>global object</a> <var>taskDestination</var> (default
@@ -1450,7 +1459,9 @@ null), run these steps. <var>processBody</var> must be an algorithm accepting a
14501459
<li><p><a for=promise>React</a> to <var>promise</var> with <var>fulfilledSteps</var> and
14511460
<var>rejectedSteps</var>.
14521461
</ol>
1462+
</div>
14531463

1464+
<div algorithm>
14541465
<p>To <dfn export lt="fully reading body as promise">fully read body as promise</dfn>, given a
14551466
<a for=/>body</a> <var>body</var>, run these steps:
14561467

@@ -1462,6 +1473,7 @@ null), run these steps. <var>processBody</var> must be an algorithm accepting a
14621473
<li><p>Return the result of <a for=ReadableStreamDefaultReader>reading all bytes</a> from
14631474
<var>reader</var>.
14641475
</ol>
1476+
</div>
14651477

14661478
<hr>
14671479

@@ -1471,6 +1483,7 @@ null), run these steps. <var>processBody</var> must be an algorithm accepting a
14711483

14721484
<hr>
14731485

1486+
<div algorithm>
14741487
<p>To <dfn export>handle content codings</dfn> given <var>codings</var> and <var>bytes</var>, run
14751488
these steps:
14761489

@@ -1482,6 +1495,7 @@ these steps:
14821495
</ol>
14831496
<!-- XXX https://github.com/whatwg/fetch/issues/716
14841497
https://github.com/httpwg/http-core/issues/58 -->
1498+
</div>
14851499

14861500

14871501
<h4 id=requests>Requests</h4>
@@ -2110,6 +2124,7 @@ or "<code>object</code>".
21102124

21112125
<hr>
21122126

2127+
<div algorithm>
21132128
<p>A <a for=/>request</a> <var>request</var> has a
21142129
<dfn for=request id=concept-request-tainted-origin>redirect-tainted origin</dfn> if these steps
21152130
return true:
@@ -2133,7 +2148,9 @@ return true:
21332148

21342149
<li>Return false.
21352150
</ol>
2151+
</div>
21362152

2153+
<div algorithm>
21372154
<p><dfn>Serializing a request origin</dfn>, given a <a for=/>request</a> <var>request</var>, is to
21382155
run these steps:
21392156

@@ -2144,13 +2161,17 @@ run these steps:
21442161
<li><p>Return <var>request</var>'s <a for=request>origin</a>,
21452162
<a lt="ASCII serialization of an origin">serialized</a>.
21462163
</ol>
2164+
</div>
21472165

2166+
<div algorithm>
21482167
<p><dfn>Byte-serializing a request origin</dfn>, given a <a for=/>request</a> <var>request</var>,
21492168
is to return the result of <a>serializing a request origin</a> with <var>request</var>,
21502169
<a>isomorphic encoded</a>.
2170+
</div>
21512171

21522172
<hr>
21532173

2174+
<div algorithm>
21542175
<p>To <dfn export for=request id=concept-request-clone>clone</dfn> a
21552176
<a for=/>request</a> <var>request</var>, run these steps:
21562177

@@ -2164,6 +2185,7 @@ is to return the result of <a>serializing a request origin</a> with <var>request
21642185

21652186
<li><p>Return <var>newRequest</var>.
21662187
</ol>
2188+
</div>
21672189

21682190
<hr>
21692191

@@ -2199,6 +2221,7 @@ source of security bugs. Please seek security review for features that deal with
21992221

22002222
<hr>
22012223

2224+
<div algorithm>
22022225
<p>To <dfn export>serialize a response URL for reporting</dfn>, given a <a for=/>response</a>
22032226
<var>response</var>, run these steps:
22042227

@@ -2221,7 +2244,9 @@ source of security bugs. Please seek security review for features that deal with
22212244
<li><p>Return the <a lt="URL serializer">serialization</a> of <var>url</var> with
22222245
<a for="URL serializer"><i>exclude fragment</i></a> set to true.
22232246
</ol>
2247+
</div>
22242248

2249+
<div algorithm>
22252250
<p>To check if <dfn export>Cross-Origin-Embedder-Policy allows credentials</dfn>, given a
22262251
<a for=/>request</a> <var>request</var>, run these steps:
22272252

@@ -2242,6 +2267,7 @@ source of security bugs. Please seek security review for features that deal with
22422267

22432268
<li><p>Return false.</p>
22442269
</ol>
2270+
</div>
22452271

22462272

22472273
<h4 id=responses>Responses</h4>

0 commit comments

Comments
 (0)