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

[whatwg] question about Web Storage setItem()'s behavior

From: 白石俊平 <shumpei.shiraishi@gmail.com>
Date: Mon, 3 Aug 2009 11:17:58 +0900
Message-ID: <104ce6580908021917l6dadd017j9e6a3db7b150fb03@mail.gmail.com>

I'm implementing the HTML5 Web Storage using Gears
(http://code.google.com/p/gear5/), so I have several questions with
the spec.

-Storage.setItem(key, val)
--is key allowed non-string type object?
--and when pass non-string object to key/value, is it automatically
converted to string?(I'm considering to convert to use String
constructor - String(key) )
--when value is null, should `setItem("key", null)` behave as like as
`removeItem("key")`? (localStorage.setItem("key", null);
alert(localStorage.length); <-- what is value displayed?)

Received on Sunday, 2 August 2009 19:17:58 UTC

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