Created
November 11, 2016 03:51
-
-
Save matthieu-D/20039394fce2d579fb0be86401849b7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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