Re: [w3ctag/design-reviews] HTML General Review: Cross-Document Messaging (#269)

The message infrastructure (structured serialize) has no way of allowing for customization of serialization, unlike JSON, with it's toJSON check to enable an object to serialize an alternative representation. For many objects, we think there is likely some kind of custom toStructuredSerialize that should have a correlated reviver function that *is related to the specific object* (e.g., not a generic reviver function), which could be mapped via tag or Symbol to the graph. This feels like a significant missing part of the infrastructure.

Also, cloning is synchronous today, because the intermediate cloned structure is not visible to the web platform. For many applications, having an asynchronous structured clone process would be preferable, but raises questions as to what the representation of the intermediate object should be. Perhaps it could be an opaque object like an ImageBitmap or CanvasProxy.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/269#issuecomment-407582966

Received on Tuesday, 24 July 2018 23:21:44 UTC