IndexedDB view all Databases and Object Stores

前端 未结 4 2078
青春惊慌失措
青春惊慌失措 2020-12-03 10:58

I\'m using IndexedDB in a Windows 8 app and I\'m very new to both. I\'ve been able to successfully create, read, update, delete objects from object stores, and have created

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-03 11:19

    At the time of writing this post [chrome 72], You can list all the databases using following command in console of the browser. Essentially indexedDB.databases() is a Promise. You can use it to get list of all databases as an array. Run a loop on the array to get the names of databases.

    indexedDB.databases().then(r => console.log(r))
    

    Hope this helps

提交回复
热议问题