mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
ed680552a2
Removes OP_HOST_GET_WORKER_LOADED, OP_HOST_POLL_WORKER, OP_HOST_RESUME_WORKER and ready/messageBuffer in cli/js/workers.ts.
11 lines
259 B
TypeScript
11 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");
|