Bug 16513 - Use WebIDL enum for IDBDatabase.transaction's mode argument
Summary: Use WebIDL enum for IDBDatabase.transaction's mode argument
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2012-03-25 14:02 UTC by Ms2ger
Modified: 2013-02-28 22:45 UTC (History)
6 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ms2ger 2012-03-25 14:02:59 UTC
enum TransactionMode { "readonly", "readwrite" };
interface IDBDatabase : EventTarget {
  IDBTransaction transaction (any storeNames, optional TransactionMode mode);

would do it. This could also have the benefit that you can remove "The value for the mode parameter is invalid.", which doesn't actually explain when the value is invalid.
Comment 1 Jonas Sicking 2012-05-02 21:35:56 UTC
I don't think we can do this until ReSpec supports it. The spec as it's written now has the correct normative requirements so this is essentially a editorial issue.

Robin, are there any plans to add support for enums to ReSpec?
Comment 2 Joshua Bell 2013-02-28 22:45:15 UTC
Spec updated: https://dvcs.w3.org/hg/IndexedDB/rev/f3d40c6295ac

* TransactionMode enum declared using WebIDL, definitions of "readonly", "readwrite", "versionchange" incorporated

* IDBDatabase.transaction() and IDBDatabaseSync.transaction() updated in WebIDL to reference TransactionMode enum and prose to drop explicit references to throwing TypeError.

* IDBTransaction.mode and IDBTransactionSync.mode updated to reference TransactionMode enum