Created
October 5, 2012 12:32
-
-
Save greenido/3839586 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
request.onupgradeneeded = function(e) { | |
console.log ("going to upgrade our DB!"); | |
todoDB.indexedDB.db = e.target.result; | |
var db = todoDB.indexedDB.db; | |
if(db.objectStoreNames.contains("todo")) { | |
db.deleteObjectStore("todo"); | |
} | |
var store = db.createObjectStore("todo", | |
{keyPath: "timeStamp"}); | |
todoDB.indexedDB.getAllTodoItems(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment