Skip to content

Instantly share code, notes, and snippets.

@dalmaer
Created May 11, 2010 15:00
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 dalmaer/397410 to your computer and use it in GitHub Desktop.
Save dalmaer/397410 to your computer and use it in GitHub Desktop.
var store = db.openObjectStore('Contact');
var lincoln = {name: 'Lincoln', number: '7012'};
var contact = store.put(lincoln);
// contact.id === 1
var contact = store.get(1);
// contact.name === 'Lincoln'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment