Skip to content

Editorial: separate TextDecoderStream constructor to two algos#364

Merged
annevk merged 5 commits into
mainfrom
noamr/tds-ctor-steps
May 21, 2026
Merged

Editorial: separate TextDecoderStream constructor to two algos#364
annevk merged 5 commits into
mainfrom
noamr/tds-ctor-steps

Conversation

@noamr
Copy link
Copy Markdown
Contributor

@noamr noamr commented May 19, 2026

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

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)
@noamr noamr changed the title Editorial: separate TextDecoderStream constructor to two algos Editorial: separate TextDecoderStream constructor to two algos May 19, 2026
Comment thread encoding.bs Outdated
Co-authored-by: Mattias Buelens <649348+MattiasBuelens@users.noreply.github.com>
@noamr noamr requested a review from annevk May 19, 2026 15:32
Copy link
Copy Markdown
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I have a bunch of nits.

Comment thread encoding.bs Outdated
Comment thread encoding.bs Outdated
Comment thread encoding.bs Outdated
Comment thread encoding.bs Outdated
Comment thread encoding.bs
Comment thread encoding.bs Outdated
<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>.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread encoding.bs Outdated
Co-authored-by: Mattias Buelens <649348+MattiasBuelens@users.noreply.github.com>
Comment thread encoding.bs
{{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>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Newline above this ol.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment thread encoding.bs Outdated
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>),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to move stream here.

Probably needs to say "given a TextDecoderStream object stream"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@annevk annevk merged commit a985b62 into main May 21, 2026
2 checks passed
@annevk annevk deleted the noamr/tds-ctor-steps branch May 21, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants