1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00
denoland-deno/tests/039_worker_deno_ns/has_ns.ts

10 lines
303 B
TypeScript

onmessage = (msg): void => {
if (msg.data === "START") {
postMessage("has_ns.ts: is window.Deno available: " + !!window.Deno);
} else {
const worker = new Worker("./maybe_ns.ts");
worker.onmessage = (msg): void => {
postMessage("[SPAWNED BY has_ns.ts] " + msg.data);
};
}
};