Skip to content

Commit d2e9b4e

Browse files
authored
Meta: use "set up" instead of "create" for TransformStreams (#36)
Follows whatwg/streams#1110.
1 parent eb2e6f8 commit d2e9b4e

File tree

2 files changed

+53
-40
lines changed

2 files changed

+53
-40
lines changed

index.bs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ The <dfn constructor for=CompressionStream lt="CompressionStream(format)"><code>
109109
1. Set [=this=]'s <a for=CompressionStream>format</a> to *format*.
110110
1. Let *transformAlgorithm* be an algorithm which takes a *chunk* argument and runs the <a>compress and enqueue a chunk</a> algorithm with [=this=] and *chunk*.
111111
1. Let *flushAlgorithm* be an algorithm which takes no argument and runs the <a>compress flush and enqueue</a> algorithm with [=this=].
112-
1. Set [=this=]'s [=GenericTransformStream/transform=] to the result of [=TransformStream/creating=] a {{TransformStream}} with <a for=TransformStream/create><var ignore>transformAlgorithm</var></a> set to *transformAlgorithm* and <a for=TransformStream/create><var ignore>flushAlgorithm</var></a> set to *flushAlgorithm*.
112+
1. Set [=this=]'s [=GenericTransformStream/transform=] to a [=new=] {{TransformStream}}.
113+
1. [=TransformStream/Set up=] [=this=]'s [=GenericTransformStream/transform=] with <i>[=TransformStream/set up/transformAlgorithm=]</i> set to *transformAlgorithm* and <i>[=TransformStream/set up/flushAlgorithm=]</i> set to *flushAlgorithm*.
113114

114115
The <dfn>compress and enqueue a chunk</dfn> algorithm, given a {{CompressionStream}} object *cs* and a *chunk*, runs these steps:
115116
1. If *chunk* is not a {{BufferSource}} type, then throw a {{TypeError}}.
@@ -141,9 +142,10 @@ A {{DecompressionStream}} has an associated <dfn for=DecompressionStream>format<
141142
The <dfn constructor for=DecompressionStream lt="DecompressionStream(format)"><code>new DecompressionStream(|format|)</code></dfn> steps are:
142143
1. If *format* is unsupported in {{DecompressionStream}}, then throw a {{TypeError}}.
143144
1. Set [=this=]'s <a for=DecompressionStream>format</a> to *format*.
144-
1. Let *transformAlgorithm* be an algorithm which takes a *chunk* argument and runs the <a>decompress and enqueue a chunk</a> algorithm with *ds* and *chunk*.
145-
1. Let *flushAlgorithm* be an algorithm which takes no argument and runs the <a>decompress flush and enqueue</a> algorithm with *ds*.
146-
1. Set [=this=]'s [=GenericTransformStream/transform=] to the result of [=TransformStream/creating=] a {{TransformStream}} with <a for=TransformStream/create><var ignore>transformAlgorithm</var></a> set to *transformAlgorithm* and <a for=TransformStream/create><var ignore>flushAlgorithm</var></a> set to *flushAlgorithm*.
145+
1. Let *transformAlgorithm* be an algorithm which takes a *chunk* argument and runs the <a>decompress and enqueue a chunk</a> algorithm with [=this=] and *chunk*.
146+
1. Let *flushAlgorithm* be an algorithm which takes no argument and runs the <a>decompress flush and enqueue</a> algorithm with [=this=].
147+
1. Set [=this=]'s [=GenericTransformStream/transform=] to a [=new=] {{TransformStream}}.
148+
1. [=TransformStream/Set up=] [=this=]'s [=GenericTransformStream/transform=] with <i>[=TransformStream/set up/transformAlgorithm=]</i> set to *transformAlgorithm* and <i>[=TransformStream/set up/flushAlgorithm=]</i> set to *flushAlgorithm*.
147149

148150
The <dfn>decompress and enqueue a chunk</dfn> algorithm, given a {{DecompressionStream}} object *ds* and a *chunk*, runs these steps:
149151
1. If *chunk* is not a {{BufferSource}} type, then throw a {{TypeError}}.

0 commit comments

Comments
 (0)