This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
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?
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