mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 15:25:08 +00:00

This aligns Workers and Window and MessagePorts to all use the same mechanism for transferring serialized messages across realms. It also allows transferring more message ports into a worker. Re-enable the Worker-echo test, as none of the MessagePort tests have themselves been flaky, and those are now using the same underlying implementation.
10 lines
247 B
JavaScript
10 lines
247 B
JavaScript
onmessage = evt => {
|
|
console.log("In Worker - Got message:", JSON.stringify(evt.data));
|
|
|
|
postMessage(evt.data);
|
|
};
|
|
|
|
console.log("In Worker - Loaded", this);
|
|
console.log("Keys: ", JSON.stringify(Object.keys(this)));
|
|
|
|
postMessage("loaded");
|