mirror of
https://github.com/denoland/deno.git
synced 2024-12-24 08:09:08 -05:00
12 lines
259 B
TypeScript
12 lines
259 B
TypeScript
|
// Tests basic postMessage, close, onmessage
|
||
|
const jsWorker = new Worker("./subdir/test_worker_basic.js", {
|
||
|
type: "module",
|
||
|
name: "jsWorker"
|
||
|
});
|
||
|
|
||
|
jsWorker.onmessage = (e): void => {
|
||
|
console.log("main recv: " + e.data);
|
||
|
};
|
||
|
|
||
|
jsWorker.postMessage("msg1");
|