-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
In the "reworked APIs" section, IDBRequest becomes a subclass of Future.
IDBTransaction behaves similarly, although it's not as simple a type as a IDBRequest. A transaction has a lifetime bounded by other asynchronous activity, after which it completes successfully ("complete" event) or fails ("abort" event), and in both cases action is likely to be taken by the script.
With current IDB you write:
tx = db.transaction(...);
tx.objectStore(...).put(...);
tx.oncomplete = function() { alert("yay, done"); };I'd expect a Future-ish IDB to let me write:
tx = db.transaction(...);
tx.objectStore(...).put(...);
tx.then(function() { alert("yay, done"); });... which of course gets more useful when you have join() operations letting you wait on multiple futures and all that other goodness.
Metadata
Metadata
Assignees
Labels
No labels