Skip to content

Instantly share code, notes, and snippets.

@jensarps
Created November 25, 2011 10:28
Show Gist options
  • Save jensarps/1393216 to your computer and use it in GitHub Desktop.
Save jensarps/1393216 to your computer and use it in GitHub Desktop.
IDBWrapper tutorial, step 4
var updatedDude = {
id: 1, // or whatever id our dude has
firstname: 'John',
lastname: 'Doe',
age: 53, // dude is now a year older
emails: [
'[email protected]',
'[email protected]'
]
};
var onsuccess = function(id){
console.log('Yeah, dude updated! id still is: ' + id);
}
var onerror = function(error){
console.log('Oh noes, sth went wrong!', error);
}
customers.put(updatedDude, onsuccess, onerror);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment