RawJSON objects should be structured serializable/deserializable #10424
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
topic: serialize and transfer
What problem are you trying to solve?
It looks to me like currently these would throw a DataCloneError DOMException according to the whatwg spec: https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal because they have a new
[[IsRawJSON]]
internal slot. I don't know for sure if whatwg internal slots are the same as tc39 internal slots, but at any rate I don't see any particular reason why these should not be supported for structured serialization/deserialization.What solutions exist today?
Don't clone them, or rely on engines to clone them in defiance of the current spec text.
How would you solve it?
Add a clause to the StructuredSerializeInternal operation that supports them.
Anything else?
No response
The text was updated successfully, but these errors were encountered: