This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
When a transaction is created, 'active' is unset when control is returned to the event loop http://w3c.github.io/IndexedDB/#dom-idbdatabase-transaction (8). When onsuccess is fired, 'active' is unset once the event has dispatched http://w3c.github.io/IndexedDB/#fire-a-success-event (4). If both of these were "queue a microtask to unset 'active'", it would be more consistent and allow promise-based APIs to interact with IDB. Currently, building an abstraction like this is impossible: beginTransaction(); getValue('foo').then(function(val) { console.log(val); return setValue(val) }); Assuming `getValue` returns a compliant promise, `setValue` fails as the transaction is inactive.
Moved to https://github.com/w3c/IndexedDB/issues/27