[whatwg] DOM Storage feedback

Anne van Kesteren annevk at opera.com
Mon Apr 28 16:20:08 PDT 2008


On Mon, 28 Apr 2008 23:14:03 +0200, Brady Eidson <beidson at apple.com> wrote:
> I would like to make sure that my understanding is correct here, since  
> you expressed doubt.
>
> 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.

This was what I was suggesting, yes.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>



More information about the whatwg mailing list