W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2011

[whatwg] About the internal structured cloning algorithm

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 2 May 2011 23:53:29 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1105022352500.19153@ps20323.dreamhostps.com>
On Sat, 8 Jan 2011, David Bruant wrote:
> I have two distinct things to say about this algorithm.
> First of all, at Step 5 :
> "If input is an Array object or an Object object, then, for each enumerable
> property in input, add a corresponding property to output having the same
> name, and having a value created from invoking the internal structured cloning
> algorithm recursively with the value of the property as the "input" argument
> and memory as the "memory" argument. The order of the properties in the input
> and output objects must be the same.
> Note : This does not walk the prototype chain."
> This seems to be the description of the ECMAScript 5 Object.keys  method
> definition (ES5 section
> In ECMAScript 5, properties of an object which aren't on the prototype chain
> are often (if not always) refered as "own properties".
> And the Object.keys method returns all own enumerable property names.

That is possible, yes.

> Second of all, I am wondering if HTML5 is the right place to define such an
> "algorithm". This seems to be extremely bound to ECMAScript (Date, RegExp...).
> As such wouldn't WebIDL be a better place to define such an algorithm ?

Nobody seems to be interested in maintaining this algorithm elsewhere, 

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 2 May 2011 16:53:29 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:32 UTC