Created
November 11, 2016 03:07
-
-
Save matthieu-D/f0a3245f0b9b5b5292565d18515bb265 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
w = new Worker('./handleDb.js'); | |
w.onmessage = function(event) { | |
document.getElementById('result').innerHTML = event.data; | |
}; | |
w.postMessage('init'); | |
function readAll() { | |
w.postMessage('readAll'); | |
} | |
function add() { | |
w.postMessage('add'); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment