Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created November 11, 2016 03:51
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 matthieu-D/20039394fce2d579fb0be86401849b7c to your computer and use it in GitHub Desktop.
Save matthieu-D/20039394fce2d579fb0be86401849b7c to your computer and use it in GitHub Desktop.
function add() {
let request = db.transaction(["name"], "readwrite")
.objectStore("name")
.add({ name: "User created just for the test" });
request.onsuccess = function(event) {
self.postMessage('Successfully added user in db');
};
request.onerror = function(event) {
self.postMessage('something went wrong here');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment