Don Rhummy
Don Rhummy

Reputation: 25830

Is there a way to know when all connections/transactions on a database are closed in IndexedDB?

I'm running in to an issue where I call close on a database connection prior to upgrading, but even though IDBDatabase.close() returns, it's not actually done closing everything so it throws a blocked event (although it allows my upgrade to continue). Is there a way I can tie the upgrade call to when the transactions are actually all done being closed?

Upvotes: 0

Views: 413

Answers (1)

Kyaw Tun
Kyaw Tun

Reputation: 13131

call close on a database connection prior to upgrading

You don't call close in this case.

Call close if you no longer use the connection or the connection is no longer usable.

Upvotes: 2

Related Questions