mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-06 02:00:46 +00:00
Merge branch 'main' of github.com:storytold/storyteller-board into main
This commit is contained in:
commit
390b4696df
1 file changed
+3
@@ -1,7 +1,10 @@
|
||||
onconnect = function (event) {
|
||||
console.log('worker loaded');
|
||||
|
||||
const port = event.ports[0];
|
||||
|
||||
port.onmessage = function (e) {
|
||||
console.log('worker message received');
|
||||
const workerResult = `Result: ${e.data[0] * e.data[1]}`;
|
||||
port.postMessage(workerResult);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user