$.indexedDB('testDB', {
version: 1,
upgrade: function(trans) {
trans.createObjectStore('store', {keyPath: 'key'});
}
}).objectStore('store').put({key: 1}).done(function() {
$.indexedDB('testDB').deleteDatabase()
.progress(function() {
console.log('Never called due to error');
}).done(function(db, event) {
console.log(event.type); // success
});
});
Raising the onblocked event in this context seems to be Chrome's bug, but it's easy way to reproduce the bug of jquery-indexeddb, which happens when accessing result property of idbRequest in the onblocked event.
Simple fix would be to just remove .result from idbRequest variable on line 46. After that, no errors are thrown and progress function is called.
Simple way to reproduce in Chrome:
Raising the onblocked event in this context seems to be Chrome's bug, but it's easy way to reproduce the bug of jquery-indexeddb, which happens when accessing
result
property ofidbRequest
in theonblocked
event. Simple fix would be to just remove.result
fromidbRequest
variable on line 46. After that, no errors are thrown and progress function is called.