Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a closed property on the db #333

Open
Jack-Works opened this issue May 7, 2020 · 3 comments
Open

Add a closed property on the db #333

Jack-Works opened this issue May 7, 2020 · 3 comments
Labels
feature request TPAC2024 Topic for discussion at TPAC 2024

Comments

@Jack-Works
Copy link

To reflect https://w3c.github.io/IndexedDB/#connection-closed

@jakearchibald
Copy link
Contributor

+1 to this. Might be better as a .state that can express more than just a boolean, also a "statechange" event would be useful.

Right now, if a library takes a database to use, it has no way of knowing when or if the database has been closed. The "close" event only fires if the database was forcibly closed.

@evanstade
Copy link

@jakearchibald as far as the state, you can probably work around this by trying to create a transaction and catching the exception, if any. Is that being done today?

As for the close event, can you elaborate on the need for this change (to help set prioritization)?

@jakearchibald
Copy link
Contributor

Hah it's been a few years. I think it was so a library could perform cleanup, because it knows the provided database is now closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request TPAC2024 Topic for discussion at TPAC 2024
Projects
None yet
Development

No branches or pull requests

5 participants