Created
May 15, 2018 04:15
-
-
Save goofmint/4f4729cef562498890e301bfffaf6687 to your computer and use it in GitHub Desktop.
This file contains 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
let db; | |
let version = 2; | |
const request = indexedDB.open("database", version); | |
request.onerror = function(event) { | |
alert("IndexedDB が使えません"); | |
}; | |
request.onsuccess = function(event) { | |
db = event.target.result; | |
db.onclose = function(event) { | |
console.log('IndexeDBを閉じました'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment