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

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

From: Jeremy Orlow <jorlow@chromium.org>
Date: Wed, 12 Aug 2009 16:30:05 -0700
Message-ID: <5dd9e5c50908121630s217aa0bex208920e2168b6856@mail.gmail.com>
On Wed, Aug 12, 2009 at 4:26 PM, Cameron McCormack <cam at mcc.id.au> wrote:

> Boris Zbarsky:
> > Given the actual example code (and not its description, which
> > doesn't match the code), the relevant section is
> > http://dev.w3.org/2006/webapi/WebIDL/#es-operations steps 1 through
> > 3 in the third bullet point.
> >
> > It looks to me like per the current spec text that will throw a
> > TypeError for the above call, unless the second argument to setItem
> > is marked [optional].
>
> Yeah I think that?s right.  I?ll just note though that behaviour when
> passing too many or too few arguments is still an open issue (although
> it?s more likely that the ?too many? case will change than the ?too few?
> case).
>
> OTOH, passing in undefined explicitly as the second argument would have
> it converted to the string "undefined".


Thanks for the clarification.  I'll file a bug on WebKit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090812/bff93889/attachment-0001.htm>
Received on Wednesday, 12 August 2009 16:30:05 UTC

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