W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2008

[whatwg] DOM Storage feedback

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 29 Apr 2008 01:20:08 +0200
Message-ID: <op.uacgfuyo64w2qv@annevk-t60.oslo.opera.com>
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/>
Received on Monday, 28 April 2008 16:20:08 UTC

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