1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-15 03:48:02 -05:00
denoland-deno/cli/tests/testdata/compat/worker/worker.mjs

10 lines
185 B
JavaScript
Raw Normal View History

console.log("hello from worker");
self.onmessage = (e) => {
if (e.data != "hello") {
throw new Error("wrong message");
}
self.postMessage({ pid: process.pid });
}