Skip to content

Instantly share code, notes, and snippets.

@jensarps
Created November 24, 2011 14:41
Show Gist options
  • Save jensarps/1391487 to your computer and use it in GitHub Desktop.
Save jensarps/1391487 to your computer and use it in GitHub Desktop.
IDBWrapper tutorial, step 2
var dude = {
firstname: 'John',
lastname: 'Doe',
age: 52,
emails: [
'johndoe@example.com',
'jd@example.com'
]
};
var onsuccess = function(id){
console.log('Yeah, dude inserted! insertId is: ' + id);
}
var onerror = function(error){
console.log('Oh noes, sth went wrong!', error);
}
customers.put(dude, onsuccess, onerror);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment