如何从它的无声坠落中恢复indexeddb?

时间:2018-08-17 04:04:05

标签: indexeddb

我遇到了我的indexeddb无法运行的问题。它不会进入任何事件处理程序。此时我有什么办法可以使它重新恢复工作?

let dbRequest = indexedDB.open('mydb');
let instance;
dbRequest.onblocked = function (event) {  
  console.error('on error')
};

dbRequest.onerror = function (e) {      
  console.error(e)
};

dbRequest.onsuccess = (e) => {  
  console.log('db open success')
}

dbRequest.onclose = function (e) {
  console.log('db is closed') 
}
dbRequest.onabort = function (e) {
  console.log('init db is onaborted')  
}

dbRequest.onupgradeneeded = function (e) {
  console.log('init db is onaborted')

};

0 个答案:

没有答案