chromium/third_party/blink/web_tests/external/wpt/fetch/private-network-access/resources/worker-fetcher.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>Worker Fetcher</title>
<script>
  window.addEventListener("message", function (evt) {
    let { url } = evt.data;

    const worker = new Worker(url);

    worker.addEventListener("message", (evt) => {
      parent.postMessage(evt.data, "*");
    });

    worker.addEventListener("error", (evt) => {
      parent.postMessage({ error: evt.message || "unknown error" }, "*");
    });
  });
</script>