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

Re: IndexedDB: undefined parameters

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 10 Oct 2012 22:43:25 -0700
Message-ID: <CA+c2ei_SHNvqsQriHg0nPyrsogTv4p1dV4eZwUi_3bD=4=CtCA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
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 Wed, Oct 10, 2012 at 6:12 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 10/10/12 6:51 PM, Jonas Sicking wrote:
>> FWIW, ES6 is going to treat the undefined value as "not passing a
>> parameter" when it comes to functions that have default values.
> When there are default values, yes.  But what about cases when there are no
> default values?

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

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

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

>> In anticipation of ES6 formally defining this, WebIDL has already
>> switched to this
> It certainly hasn't so far, though I agree it may be a good idea to do this.

Yeah. It seems like I'm misremembering. We need to get WebIDL updated here.

/ Jonas
Received on Thursday, 11 October 2012 05:44:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:07 UTC