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

[whatwg] structured clone algorithm should be defined for primitive values

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 31 Jan 2011 23:14:36 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1101312313160.26730@ps20323.dreamhostps.com>
On Fri, 28 Jan 2011, David Flanagan wrote:
> 
> The structured clone algorithm is currently defined only for object 
> inputs and doesn't say what should happen when a primitive value is 
> passed to it.  (The internal structured cloning algorithm handles 
> primitives, but the outer level one does not.)
> 
> Browser implementations allow primitives such as strings to be passed to 
> History.pushState(), window.postMessage() and other methods that 
> reference the structured clone algorithm.
> 
> I think you can fix this by changing "object" to "value" in four places

Fixed. Thanks.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 31 January 2011 15:14:36 UTC

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