This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11398 - [IndexedDB] Methods that take multiple optional parameters should instead take an options object
Summary: [IndexedDB] Methods that take multiple optional parameters should instead tak...
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Jeremy Orlow
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on: 11350
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-24 17:12 UTC by Jeremy Orlow
Modified: 2012-01-17 11:03 UTC (History)
4 users (show)

See Also:


Attachments

Description Jeremy Orlow 2010-11-24 17:12:53 UTC
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).
Comment 1 Jeremy Orlow 2010-11-25 14:50:12 UTC
My recommendation is that the following methods be converted:
IDBDatabase.createObjectStore
IDBObjectStore.createIndex
IDBObjectStore.openCursor
IDBIndex.openCursor
IDBIndex.openKeyCursor
IDBKeyRange.bound

The following don't seem like good candidates:
IDBObjectStore.put
IDBObjectStore.add
IDBCursor.continue

This is what we're doing in Chrome anyway.
Comment 2 Jeremy Orlow 2011-03-03 20:50:19 UTC
Note that we decided to throw if we get an option we didn't expect.
Comment 3 Odin Hørthe Omdal 2012-01-17 11:03:59 UTC
Jeremy: You went back on that throwing-on-unknown, as far as I can tell from the current spec. If not I'd like to discuss why it shouldn't throw :-)