
console.log("Hello from worker");

addEventListener('message', function (e) {
  var msg = e.data;
  if (msg.type === 'ping') {
    postMessage({
      type: 'pong',
      text: 'Hi from worker'
    });
  }
});


console.log("Hello from worker", this);

addEventListener('message', function (e) {
  var msg = e.data;
  if (msg.type === 'ping') {
    postMessage({
      type: 'pong',
      text: 'Hi from worker'
    });
  }
});

add extra logging in worker