Re: [whatwg/encoding] Make TextEncoder and TextDecoder be transform streams (#127)

ricea commented on this pull request.

Fixed everything from @annevk's comments. I didn't respond "done" to each one individually as it might be a bit spammy. 

I considered combining the "convert code unit to scalar value" algorithm with "shared UTF-16 decoder" but it would significantly complicate the latter for little benefit.

>  <p>The <dfn method for=TextDecoder><code>decode(<var>input</var>, <var>options</var>)</code></dfn>
 method, when invoked, must run these steps:
 
 <ol>
+ <li><p>Let <var>readable</var> be <a for=TextDecoder>transform</a>'s \[[readable]] <a>internal
+ slot</a>.
+
+ <li><p>If <a abstract-op>IsReadableStreamLocked</a>(<var>readable</var>) is true, throw a
+ {{TypeError}} exception.

"throw" is hyperlinked elsewhere in this standard. It would be nice to be consistent.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/encoding/pull/127#pullrequestreview-90799692

Received on Tuesday, 23 January 2018 14:46:08 UTC