- From: Oliver Hunt <oliver@apple.com>
- Date: Wed, 04 Sep 2013 11:56:32 -0700
- To: whatwg@lists.whatwg.org
The current structured clone algorithm does not include support for the Map and Set types, so a developer would need to manually implement the serialisation and deserialisation. While this would not be impossible it does seem like it is an unnecessary inconvenience for a core type in ES6. The semantics of Map and Set are stable so unless someone objects i see no reason we should not amend the internal structured clone algorithm to specially handle Set and Map in addition to Array. To support cloning of Map and Set we will want to recursively call the structured clone algorithm on each key or key/value pair in the %SetData% or %MapData% internal arrays, and maintain the order of those entries (as the Map/Set ordering is well defined) --Oliver
Received on Wednesday, 4 September 2013 18:56:56 UTC