[whatwg] question about Web Storage setItem()'s behavior
Jeremy Orlow
jorlow at chromium.org
Wed Aug 12 16:30:05 PDT 2009
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-0002.htm>
More information about the whatwg
mailing list