test_worker.js (448B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 console.log("[WORKER] started", globalThis.location.toString(), globalThis); 7 8 globalThis.onmessage = function (e) { 9 const { type, message } = e.data; 10 11 if (type === "log-in-worker") { 12 // Printing `e` so we can check that we have an object and not a stringified version 13 console.log("[WORKER]", message, e); 14 } 15 };