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

Re: [Bug 11398] New: [IndexedDB] Methods that take multiple optional parameters should instead take an options object

From: Jeremy Orlow <jorlow@chromium.org>
Date: Fri, 10 Dec 2010 15:27:27 +0000
Message-ID: <AANLkTikdUsM1c9AM5zBd2xzC_ESzgBG8-5a6GRRgsQn6@mail.gmail.com>
To: public-webapps@w3.org
In addition to createObjectStore, I also intend to convert the following over:


IDBObjectStore.createIndex
IDBObjectStore.openCursor
IDBIndex.openCursor
IDBIndex.openKeyCursor
IDBKeyRange.bound

We did all of these two weeks ago in Chromium and have gotten some feedback.
 The main downside is that typos are silently ignored by JavaScript.  We
considered throwing if someone passed in an option we didn't recognize, but
this would make it impossible to add more options later (which is one of the
main reasons for doing this change).  I think what we might do is just log
something in the console with this happens.  (Should the spec actually make
a recommendation to this effect?)  Besides that, I think overall we're happy
with the change.

Lastly, are we happy with all the variable names for the above functions
being directly turned into parameter names for the options object?  If not,
please enumerate any changes you think we should do.

I plan to make this change early next week barring any major controversies.

J

On Wed, Nov 24, 2010 at 5:12 PM, <bugzilla@jessica.w3.org> wrote:

> http://www.w3.org/Bugs/Public/show_bug.cgi?id=11398
>
>           Summary: [IndexedDB] Methods that take multiple optional
>                    parameters should instead take an options object
>           Product: WebAppsWG
>           Version: unspecified
>          Platform: PC
>        OS/Version: All
>            Status: NEW
>          Severity: normal
>          Priority: P2
>         Component: Indexed Database API
>        AssignedTo: dave.null@w3.org
>        ReportedBy: jorlow@chromium.org
>         QAContact: member-webapi-cvs@w3.org
>                CC: mike@w3.org, public-webapps@w3.org
>        Depends on: 11350
>
>
> All methods that take multiple optional parameters (or which might possibly
> take multiple in the future) should be converted over to options objects
> like
> what's described in bug 11350 (for createObjectStore).
>
> --
> Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
>
Received on Friday, 10 December 2010 15:28:18 GMT

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