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 15.2.3.14).
> 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, 
so...

-- 
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.3.1 : Monday, 13 April 2015 23:09:05 UTC