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

I've attempted to implement the "Constructor version" of the API discussed https://github.com/whatwg/encoding/issues/72#issuecomment-372601600. It doesn't seem too bad.

I have some tests in https://github.com/GoogleChromeLabs/text-encode-transform-prollyfill/blob/f4de56ca18b98e55a79e7f2c9cb7658097b2aaf4/tests/non-interference.html. From the perspective of a consumer of the API, the behaviour looks pleasantly unsurprising to me.

This is not a final decision to go with the "Constructor version" of the API. I could switch to the "Static method version" depending on how people think this looks.

-- 
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#issuecomment-375343873

Received on Thursday, 22 March 2018 15:17:38 UTC