Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Web Worker listening for event using addEventListener
var myWorker = new Worker('aWorkerTask.js');
myWorker.addEventListener('message', function(e) {
console.log("Called back by the worker!\n" +;
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment