Re: [streams] can streams be transferred via postMessage()? (#276)

Not streams but the reader and the writer are important for pipeTo. If the reader and the writer gotten via getReader() and getWriter() are authentic, we can enable the optimization.

```
var rs = ...; // rs is a UA-created ReadableByteStream.
var ws = ...; // ws is a US-created WritableByteStream.

var reader = rs.getReader();
var writer = ws.getWriter();

var rsx = {
  getReader: () => reader,
  pipeTo: rs.pipeTo
};

var wsx = {
  getWriter: () => writer
};

rsx.pipeTo(wsx); // This works with the optimization.
```


---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/276#issuecomment-86520379

Received on Thursday, 26 March 2015 13:52:30 UTC