Created
June 4, 2016 18:45
-
-
Save deebloo/e1f8215987e993ecc89d47ab60bf6b9a 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
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