Skip to content

Instantly share code, notes, and snippets.

@deebloo
Created June 4, 2016 18:45
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 deebloo/e1f8215987e993ecc89d47ab60bf6b9a to your computer and use it in GitHub Desktop.
Save deebloo/e1f8215987e993ecc89d47ab60bf6b9a to your computer and use it in GitHub Desktop.
var myWorker = createWorker(function (e) {
self.postMessage(e.data.toUpperCase());
});
myWorker.onMessage = function (e) {
console.log(e.data); // HELLO FROM AN INLINE WORKER!
}
myWorker.postMessage('hello from an inline worker!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment