[whatwg] DOM Storage feedback

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