Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created November 11, 2016 03:07
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/f0a3245f0b9b5b5292565d18515bb265 to your computer and use it in GitHub Desktop.
Save matthieu-D/f0a3245f0b9b5b5292565d18515bb265 to your computer and use it in GitHub Desktop.
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