let db; | |
let version = 4; | |
const request = indexedDB.open("database", version); | |
request.onerror = function(event) { | |
alert("IndexedDB が使えません"); | |
}; | |
request.onupgradeneeded = function(event) { | |
db = event.target.result; | |
let txn = event.target.transaction; | |
console.log(txn.objectStoreNames); | |
// -> DOMStringList {0: "items", 1: "products", length: 2} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment