- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 14 Jul 2020 09:57:38 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 14 July 2020 16:57:52 UTC
It occurs to me that it might be a bit strange that for author-created duplex streams, the syntax is ```js destination.postMessage(duplex, { transfer: [duplex.readable, duplex.writable] }); ``` whereas for transform streams it is ``` destination.postMessage(transform, { transfer: [transform] }); ``` I can't think of any nice solution for this though. Unfortunately the structured-serialize algorithm will throw for any platform object not explicitly marked as serializable (like a `TransformStream`), so to make the former syntax work for them we'd need make them `[Serializable]`. But that doesn't seem doable in general. It'd require new infrastructure in the structured clone algorithm I guess, which is probably not worth 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-658295339
Received on Tuesday, 14 July 2020 16:57:52 UTC