[whatwg] About the internal structured cloning algorithm
ian at hixie.ch
Mon May 2 16:53:29 PDT 2011
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 184.108.40.206).
> 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. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg