summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/web-locks/resources/parentworker.js
blob: 2b2b2c20280c5caf921290f7f0e30ed4a065e394 (plain)
1
2
3
4
5
6
7
8
9
10
// Just transparently forwards things to the child worker

importScripts("/web-locks/resources/helpers.js");
const worker = new Worker("/web-locks/resources/worker.js");

self.addEventListener("message", async ev => {
  const data = await postToWorkerAndWait(worker, ev.data);
  data.rqid = ev.data.rqid;
  postMessage(data);
});