W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2015

Are there any plans to make IndexedDB and promises play nice?

From: Jeremy Scheff <jdscheff@gmail.com>
Date: Wed, 15 Apr 2015 18:04:49 -0400
Message-ID: <CAK0+hsLaJWkitktoezka-f8wkEvQUhAhdq9S+R74xHRyRKXpmA@mail.gmail.com>
To: public-webapps@w3.org
Currently, wrapping IndexedDB in promises is a perilous task. Pun intended,
since the sticking point seems to be the distinction between microtasks and
macrotasks. See http://stackoverflow.com/q/28388129/786644 for an example.
Basically, it's not clear whether resolving a promise should auto-commit a
transaction or not. Behavior varies across browsers and promise libraries,
and I don't even know what the "correct" behavior actually is.

Although having the IndexedDB API completely redone in promises would be
nice, I understand that may be too big of a change to be feasible. That's
fine. All I really would like is for there to be some way to wrap the
event-based API in promises without things breaking.

So what's the current status of IndexedDB and promises? Is there any hope
that they will work well together in the near future?

--
Jeremy Scheff
Received on Thursday, 16 April 2015 07:44:59 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:31 UTC