whatwg / streams

Streams Standard
https://streams.spec.whatwg.org/
Other
1.34k stars 155 forks source link

Reuse HTML structuredClone for owning streams #1285

Open youennf opened 1 year ago

youennf commented 1 year ago

https://github.com/whatwg/streams/pull/1271 is somehow duplicating https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone, except:

We should try to reuse more of HTML spec here

MattiasBuelens commented 1 year ago

Ideally, HTML would export an abstract op StructuredClone(value, transferList) and add it to this list, so it can be used by Streams. Then the user-land structuredClone() function would simply forward to that abstract op.