summaryrefslogtreecommitdiff
path: root/cli/tests/039_worker_deno_ns/has_ns.ts
blob: 8d25071226e1f4c1054e50044aa7e2b2d9b0cd17 (plain)
1
2
3
4
5
6
7
8
9
10
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);
    };
  }
};