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

So https://github.com/whatwg/streams/pull/1053 is nearing completion. The remaining open issue, which I think we could use community and implementer input on, is whether to support double-transfers (e.g. window -> window -> worker) now or later.

I'm a bit hesitant about putting double-transfers off until later, given that we had developers try this out behind a flag and become sad about them not working. (See [upthread](https://github.com/whatwg/streams/issues/276#issuecomment-482749288).) If we do put them off, I'd like us to add an explicit transfer-time error to avoid the confusing developer experience. E.g. each transferred stream gets a bit saying "was created by transferring" that prevents further transfers by throwing an "NotImplemented" DOMException.

However, it also sounds like there are developers (who haven't found their way to this thread, but have showed up in e.g. the origin trial feedback) which would benefit from this feature with only single-transfers supported.

My impression is that recent discussions have started to discover how double-transfers could be supported, without too much effort. And it sounds like supporting double-transfers would not cause any backward-incompatible changes. Given this, I'd recommend that we merge #1053 and then work on double-transfers in the Chromium implementation and spec ASAP afterward. We could open a new issue distilling the various discussions that have happened here so far.

If folks disagree, either web developers planning to use this feature or implementers with concerns about merging #1053, I'd love to hear about it.

-- 
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/276#issuecomment-658299163

Received on Tuesday, 14 July 2020 17:05:37 UTC