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

[whatwg] DOM Storage feedback

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 13 Jan 2009 09:41:46 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0901130940230.7181@hixie.dreamhostps.com>
On Mon, 28 Apr 2008, Brady Eidson wrote:
> 
> Anne was asserting that since the interface for setItem() specifies a 
> DOMString as the input, anything you pass it will be stringified.  
> Therefore passing it the null value would be stringified to "null".  
> This is what you currently see in all the major browsers with 
> window.alert(null), for example, which is also specified as a DOMString 
> input parameter.
> 
> Therefore a call to setItem("foo", null); becomes, in effect, 
> setItem("foo", "null");
> 
> Is this correct?
> 
> If so, the spec is fine as-is, and removeItem() is the only way to 
> remove an individual item.

That is correct, at least currently. I am tempted to change this to 
[Null=Empty], though (i.e. make 'null' act like the empty string). 
However, I'm somewhat stuck on this as it depends on what happens with 
[Null] in WebIDL.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 13 January 2009 01:41:46 UTC

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