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

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

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 12 Aug 2009 08:34:36 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0908120829230.28566@hixie.dreamhostps.com>
On Wed, 12 Aug 2009, ?~Y??~_???~J??? wrote:
> 
> and, when passed value is undefined (e.g. `setItem("key")`), which
> behavior will be correct?
> On current implementation of browsers, I looked as follows.
> - IE and Firefox raise error, (arguments number is incorrect)
> - Webkit family persist it as string ("undefined")

I believe WebIDL says that a TypeError exception should be thrown, but it 
was not immediately obvious to me how to derive this from the spec.

   http://dev.w3.org/2006/webapi/WebIDL/

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 12 August 2009 01:34:36 UTC

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