summaryrefslogtreecommitdiffstats
path: root/devtools/shared/webconsole/test/chrome/console-test-worker.js
blob: b3091faf8f0a591853fb7afd4827564c5f69982c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"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");
  }
};

postMessage("load");