1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-14 16:33:45 -05:00
denoland-deno/cli/tests/039_worker_deno_ns/has_ns.ts

11 lines
303 B
TypeScript
Raw Normal View History

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);
};
}
};