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

白石俊平 shumpei.shiraishi at gmail.com
Wed Aug 12 01:54:16 PDT 2009


> 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.

Ok, I understood what behavior is correct (and that current webkit's
behavior is a bit wrong).

very thanks.

On Wed, Aug 12, 2009 at 5:34 PM, Ian Hickson<ian at hixie.ch> wrote:
> 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.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list