Skip to content

Commit 4128e96

Browse files
committed
Correct and consistify TransformStream boilerplate
1 parent 78f9bdd commit 4128e96

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

fetch.bs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4324,20 +4324,20 @@ steps:
43244324
<p>Otherwise:</p>
43254325

43264326
<ol>
4327-
<li><p>Let <var>transformStream</var> be a new a {{TransformStream}}.
4327+
<li><p>Let <var>transformStream</var> be a new {{TransformStream}}.
43284328

43294329
<li><p>Let <var>identityTransformAlgorithm</var> be an algorithm which, given <var>chunk</var>,
43304330
<a for=TransformStream lt=enqueue>enqueues</a> <var>chunk</var> in <var>transformStream</var>.
43314331

4332-
<li><p><a for=TransformStream lt="setting up">Set up</a> <var>transformStream</var> with
4332+
<li><p><a for=TransformStream>Set up</a> <var>transformStream</var> with
43334333
<a for="TransformStream/set up"><i>transformAlgorithm</i></a> set to
43344334
<var>identityTransformAlgorithm</var> and
43354335
<a for="TransformStream/set up"><i>flushAlgorithm</i></a> set to
43364336
<var>processResponseEndOfBody</var>.
43374337

4338-
<li><p>Set <var>response</var>'s <a for=response>body</a> to the result of
4339-
<a for=ReadableStream lt="piping through">piping</a> <var>response</var>'s
4340-
<a for=response>body</a> through <var>transformStream</var>.
4338+
<li><p>Set <var>response</var>'s <a for=response>body</a>'s <a for=body>stream</a> to the result
4339+
of <var>response</var>'s <a for=response>body</a>'s <a for=body>stream</a>
4340+
<a for=ReadableStream>piped through</a> <var>transformStream</var>.
43414341
</ol>
43424342

43434343
<p class=note>This {{TransformStream}} is needed for the purpose of receiving a notification when
@@ -4532,6 +4532,8 @@ these steps:
45324532
<p>If <var>requestForServiceWorker</var>'s <a for=/>body</a> is non-null, then:
45334533

45344534
<ol>
4535+
<li><p>Let <var>transformStream</var> be a new {{TransformStream}}.
4536+
45354537
<li>
45364538
<p>Let <var>transformAlgorithm</var> given <var>chunk</var> be these steps:
45374539

@@ -4543,22 +4545,20 @@ these steps:
45434545
<a for="fetch controller">terminate</a> <var>fetchParams</var>'s
45444546
<a for="fetch params">controller</a>.
45454547

4546-
<li><p>Otherwise, <a for=ReadableStream>enqueue</a> <var>chunk</var>. The user agent may
4547-
split the chunk into <a>implementation-defined</a> practical sizes and
4548-
<a for=ReadableStream>enqueue</a> each of them. The user agent also may concatenate the
4549-
chunks into an <a>implementation-defined</a> practical size and
4550-
<a for=ReadableStream>enqueue</a> it.
4548+
<li><p>Otherwise, <a for=ReadableStream>enqueue</a> <var>chunk</var> in
4549+
<var>transformStream</var>. The user agent may split the chunk into
4550+
<a>implementation-defined</a> practical sizes and <a for=ReadableStream>enqueue</a> each of
4551+
them. The user agent also may concatenate the chunks into an <a>implementation-defined</a>
4552+
practical size and <a for=ReadableStream>enqueue</a> it.
45514553
</ol>
45524554

4553-
<li><p>Let <var>transformStream</var> be the result of <a for=TransformStream>setting up</a> a
4554-
{{TransformStream}} with <var>transformAlgorithm</var>.
4555-
4556-
<li><p>Let <var>transformedStream</var> be the result of <var>requestForServiceWorker</var>'s
4557-
<a for=/>body</a>'s <a for=body>stream</a> <a for=ReadableStream>piped through</a>
4558-
<var>transformStream</var>.
4555+
<li><p><a for=TransformStream>Set up</a> <var>transformStream</var> with
4556+
<a for="TransformStream/set up"><i>transformAlgorithm</i></a> set to
4557+
<var>transformAlgorithm</var>.
45594558

45604559
<li><p>Set <var>requestForServiceWorker</var>'s <a for=/>body</a>'s <a for=body>stream</a> to
4561-
<var>transformedStream</var>.
4560+
the result of <var>requestForServiceWorker</var>'s <a for=/>body</a>'s <a for=body>stream</a>
4561+
<a for=ReadableStream>piped through</a> <var>transformStream</var>.
45624562
</ol>
45634563

45644564
<li><p>Let <var>serviceWorkerStartTime</var> be the <a for=/>coarsened shared current time</a>

0 commit comments

Comments
 (0)