You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "steps for opening a database" ensure that if an upgrade transaction is running that a subsequent open request with a higher version is "deferred" until the previous request is completed. And it should not be necessary to assign a "versionchange" handler in your "upgradeneeded" handler.
For example, the following should work:
indexedDB.open('db',1).onsuccess=e=>{letdb=e.target.result;db.onversionchange=e=>db.close();// Get out of the way.};indexedDB.open('db',2).onblocked=e=>alert('should not happen!');
It's reasonable to expect the same thing for deletes:
indexedDB.open('db',1).onsuccess=e=>{letdb=e.target.result;db.onversionchange=e=>db.close();// Get out of the way.};indexedDB.deleteDatabase('db').onblocked=e=>alert('should not happen!');
... but the spec does not require that. Firefox behaves as expected. Chrome does not but we're fixing to match Firefox.
We should add a clause to the "steps for deleting a database" to wait for running upgrades.
The text was updated successfully, but these errors were encountered:
Also:
* Remove 'delete pending' flag which is not longer needed.
* Simplify some section names.
* Move the versionchange/blocked logic from upgrade steps to
open steps, for symmetry with delete steps.
* Rename 'Authorization' section to 'Security Concerns'
The "steps for opening a database" ensure that if an upgrade transaction is running that a subsequent open request with a higher version is "deferred" until the previous request is completed. And it should not be necessary to assign a "versionchange" handler in your "upgradeneeded" handler.
For example, the following should work:
It's reasonable to expect the same thing for deletes:
... but the spec does not require that. Firefox behaves as expected. Chrome does not but we're fixing to match Firefox.
We should add a clause to the "steps for deleting a database" to wait for running upgrades.
The text was updated successfully, but these errors were encountered: