This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28566 - Add a synchronous structured clone API
Summary: Add a synchronous structured clone API
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/#structu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-27 09:51 UTC by contributor
Modified: 2016-03-03 17:33 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2015-04-27 09:51:01 UTC
Specification: https://html.spec.whatwg.org/multipage/infrastructure.html
Multipage: https://html.spec.whatwg.org/multipage/#structured-clone
Complete: https://html.spec.whatwg.org/#structured-clone
Referrer: https://html.spec.whatwg.org/multipage/

Comment:
Add a synchronous structured clone API

Posted from: 77.57.114.240 by annevk@annevk.nl
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0
Comment 1 Anne 2015-04-27 09:51:44 UTC
See https://lists.w3.org/Archives/Public/public-webapps/2015AprJun/thread.html#msg251 for context and general support to add this.
Comment 2 Travis Leithead [MSFT] 2015-04-27 19:47:27 UTC
I think this is interesting, but isn't the use case in general for cross-origin? And in order to get your Transfer-Blob to a cross-origin destination, you probably have to use an existing gateway like postMessage, which is already going to use structured clone internally?

And if the use case is for object graph serialization/rehydration, then I would like to see this proceed in EcmaScript. I noticed Object.assign which is a "shallow" object clone. A "deep" clone would also be nice and could use structured clone (though it would be nice to keep prototype connections if possible).
Comment 3 Ian 'Hixie' Hickson 2015-05-05 21:38:40 UTC
I don't understand the use case here.

In any case this probably belongs in the JS spec. I don't think HTML should be where we maintain the core concept of structured cloning.