Skip to content

Instantly share code, notes, and snippets.

@greenido
Created October 5, 2012 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greenido/3839586 to your computer and use it in GitHub Desktop.
Save greenido/3839586 to your computer and use it in GitHub Desktop.
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