Editorial: separate TextDecoderStream constructor to two algos#364
Merged
Conversation
One algo (the constructor) is used by JS, and the "set up" steps is to be used by other specs. See whatwg/fetch#1862 (review)
TextDecoderStream constructor to two algos
5 tasks
Co-authored-by: Mattias Buelens <649348+MattiasBuelens@users.noreply.github.com>
MattiasBuelens
approved these changes
May 19, 2026
annevk
reviewed
May 19, 2026
Member
annevk
left a comment
There was a problem hiding this comment.
Looks good, but I have a bunch of nits.
| <li><p>Set <a>this</a>'s <a for=GenericTransformStream>transform</a> to <var>transformStream</var>. | ||
| <li><p>Set <var>stream</var>'s <a for=TextDecoderCommon>decoder</a> to a new instance of <var>encoding</var>'s <a for=/>decoder</a>. | ||
|
|
||
| <li><p>Set <var>stream</var>'s <a for=TextDecoderCommon>I/O queue</a> to a new <a for=/>I/O queue</a>. |
Member
There was a problem hiding this comment.
Any reason to move these two steps further down? Making them separate steps makes sense, but it would be nicer for the diff if they are in the same place still.
Co-authored-by: Mattias Buelens <649348+MattiasBuelens@users.noreply.github.com>
annevk
reviewed
May 20, 2026
| {{TextDecoderStream}} stream, an optional [=/encoding=] <var>encoding</var> (default <a>UTF-8</a>), | ||
| an optional <a for=/>error mode</a> <var>errorMode</var> (default "<code>replacement</code>"), and | ||
| an optional boolean <var>ignoreBOM</var> (default false), run these steps: | ||
| <ol> |
Comment on lines
+1863
to
+1864
| <p>To <dfn export>set up a text decoder stream</dfn> <var>stream</var>, given a | ||
| {{TextDecoderStream}} stream, an optional [=/encoding=] <var>encoding</var> (default <a>UTF-8</a>), |
Member
There was a problem hiding this comment.
You need to move stream here.
Probably needs to say "given a TextDecoderStream object stream"
annevk
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One algo (the constructor) is used by JS, and the "set up" steps is to be used by other specs.
See whatwg/fetch#1862 (review)
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff