1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 17:15:08 +00:00
serenity/Base/res/html/misc/worker.js
Andrew Kaster 1602663b9e LibWeb+WebWorker: Implement a first cut of post_message for Workers
This implementation completely ignores MessagePorts, and manually plumbs
data through LocalSockets.
2023-11-24 08:41:38 +01:00

10 lines
259 B
JavaScript

onmessage = evt => {
console.log("In Worker - Got message:", JSON.stringify(evt.data));
postMessage(evt.data, null);
};
console.log("In Worker - Loaded", this);
console.log("Keys: ", JSON.stringify(Object.keys(this)));
postMessage("loaded", null);