This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dbName = prompt("Enter the name of the database:"); | |
const request = indexedDB.open(dbName); | |
request.onerror = function(event) { | |
console.error("Could not open database", event.target.errorCode); | |
}; | |
request.onsuccess = function(event) { | |
const db = event.target.result; | |
const objectStoreNames = Array.from(db.objectStoreNames); | |
const data = {}; |