- From: Adam Rice <notifications@github.com>
- Date: Mon, 24 Jul 2017 04:11:18 +0000 (UTC)
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/streams/issues/754/317314940@github.com>
The use of TextDecoder in `pipeThrough()` is just a proposed change to the standard. It hasn't been formally reviewed and no browser implements it natively. There is a prollyfill (a polyfill for the proposed change) at https://github.com/GoogleChrome/text-encode-transform-prollyfill which is what the demo uses. I'm thinking of including a comment in the example code to clarify that this is only proposed usage. What do you think? > Why does Chromium 59 throw a TypeError though .pipeThrough() is defined at ReadableStream object? It's actually complaining about `writable` not being a WritableStream object. The exception description could be better. > What is the proper parameter pattern expected by .pipeThrough()? For example, does ReadableStream().pipeThrough(new WritableStream(), new ReadableStream()) reflect the expected parameters passed to the function? It expects an object with `readable` and `writable` properties. So ``` new ReadableStream().pipeThrough( {writable: new WritableStream(), readable: new ReadableStream()}); ``` would be correct syntax. > Is /streams-master/demos/transforms/transform-stream-polyfill.js which is loaded at the example currently necessary to use .pipeThrough() at Chromium browser? Yes. There's some more standardisation work to be done before TransformStream will be ready: https://streams.spec.whatwg.org/#ts. If you'd like to help with the standardisation work you could take a look at some of our outstanding issues: https://github.com/whatwg/streams/issues?q=is%3Aissue+is%3Aopen+label%3A%22transform+streams%22 Issues with Chrome's implementation of the standard should be filed on Chrome's bug tracker at https://crbug.com. To briefly summarise the status: ReadableStream has some deviations from the current version of the standard. The largest one is that `type: 'bytes'` passed to the constructor doesn't work. The `pipeTo()` and `pipeThrough()` implementation is up to date, however. There are no known deviations of Chrome's WritableStream from the standard. -- 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/streams/issues/754#issuecomment-317314940
Received on Monday, 24 July 2017 04:11:42 UTC