summaryrefslogtreecommitdiff
path: root/tests/specs/run/worker_close_nested/close_nested_parent.js
blob: d1fe47553e4b6d6ed9d2bcf3b7a2b5f7ab604a24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

console.log("Starting the parent worker");

new Worker(
  import.meta.resolve("./close_nested_child.js"),
  { type: "module" },
);

self.addEventListener("message", () => {
  console.log("Closing");
  self.close();
});