javascript - How can I wait until an IndexedDB instance is closed? -


the indexeddb method close is asynchronous, how can wait until close has finished? usecase close indexeddb after automated tests , before next test, delete database , re-open it.

the problem i'm seeing indexeddb.deletedatabase fires blocked event because database hasn't yet been closed asynchronously (as can see deletedatabase's documentation linked to). i'm not entirely sure if database still deleted in case, despite blocked event being fired.

you don't need wait close completed events, close, delete database , re-open it.

as can see in indexeddb api doc, close method not dispatch completed event, database delete method does. anyways don't need listen these events.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -