1
0
Fork 0
firefox/devtools/shared/webconsole/test/chrome/console-test-worker.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

21 lines
346 B
JavaScript

"use strict";
console.log("Log from worker init");
function f() {
const a = 1;
const b = 2;
const c = 3;
return { a, b, c };
}
self.onmessage = function (event) {
if (event.data == "ping") {
f();
postMessage("pong");
} else if (event.data?.type == "log") {
console.log(event.data.message);
}
};
postMessage("load");