Created
October 8, 2019 15:53
-
-
Save ecancino/e508d35df793b9f41cc53f7650d512e6 to your computer and use it in GitHub Desktop.
WebWorker
This file contains hidden or 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
| console.log("hi!"); | |
| // worker.js | |
| this.onmessage = e => { | |
| console.log("worker.js: Message received from main script", e.data); | |
| this.postMessage("Hello main"); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment