W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2012

Re: IndexedDB: undefined parameters

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 11 Oct 2012 01:57:13 -0400
Message-ID: <50765FB9.40202@mit.edu>
To: Jonas Sicking <jonas@sicking.cc>
CC: Robert Ginda <rginda@chromium.org>, Alec Flett <alecflett@chromium.org>, public-webapps@w3.org, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 10/11/12 1:43 AM, Jonas Sicking wrote:
> I agree that it's not explicitly the same thing as what we have here.
> But I think the general idea is "for optional arguments, treat
> 'undefined' as if a value wasn't passed at all".

OK.  I can live with that, as long as everyone else gets on that page too.

>> Note that openCursor, which I think is where this thread started, does NOT
>> define default values for its arguments.  Should it?
>
> Probably yes. I think explicitly making 'null' the default value would
> clear things up.

That would help, yes.  As would defining null and undefined explicitly 
to be missing key values.

>> (As a side note, the IDL for openCursor is not valid WebIDL, because "any?"
>> is not a valid WebIDL type.)
>
> That sounds like a WebIDL bug.

It's a bug in the IDL for openCursor, since "any" already allows null as 
a value so "any?" is nonsensical just like "Node??" would be nonsensical.

-Boris
Received on Thursday, 11 October 2012 05:57:46 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:55 GMT