- From: <nobody@w3.org>
- Date: Mon, 10 Aug 2015 08:52:50 +0000
- To: public-webapps@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29049
Bug ID: 29049
Summary: Queue a microtask to unset active on transaction
Product: WebAppsWG
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Indexed Database API
Assignee: dave.null@w3.org
Reporter: jaffathecake@gmail.com
QA Contact: public-webapps-bugzilla@w3.org
CC: mike@w3.org, public-webapps@w3.org
Target Milestone: ---
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
Received on Monday, 10 August 2015 08:52:52 UTC