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 25415 - BroadcastChannel: should support structured clones
Summary: BroadcastChannel: should support structured clones
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-22 19:06 UTC by Jonas Sicking (Not reading bugmail)
Modified: 2014-04-30 00:16 UTC (History)
3 users (show)

See Also:


Attachments

Description Jonas Sicking (Not reading bugmail) 2014-04-22 19:06:39 UTC
I mailed this to the whatwg list, but getting a bug on file seems better:

It would be very useful to be able to send structured data, including
Blobs, through the BroadcastChannel API.

This is something we've seen any time we've done storage or message
passing, that one of the first thing authors ask for is to not have to
do JSON serialization/parsing manually. The ability to pass
ArrayBuffers and Blobs is somewhat less commonly asked for, likely
because binary data is less often used, but seems important
nonetheless.

We can't allow transferring of objects, since you can't transfer
something to all listeners of a broadcasting API. But plain structured
clones should be no problem to support conceptually (though more work
to implement of course).

We've started looking at doing structured clone support for Firefox
and likely won't ship until we have that implemented.
Comment 1 Ian 'Hixie' Hickson 2014-04-22 20:44:36 UTC
Yeah that makes a lot of sense. For some reason when speccing the first draft of this I forgot we could clone without supporting transfers.
Comment 2 contributor 2014-04-30 00:14:08 UTC
Checked in as WHATWG revision r8590.
Check-in comment: Make BroadcastChannel support structured clones
http://html5.org/tools/web-apps-tracker?from=8589&to=8590
Comment 3 Ian 'Hixie' Hickson 2014-04-30 00:16:33 UTC
'Tis done.