summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/WorkerDebuggerGlobalScope.setImmediate_debugger.js
blob: b2a01d380c1bb58109c4d1f41107f1497d3a83a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
"use strict";

this.onmessage = function (event) {
  switch (event.data) {
    case "ping":
      setImmediate(function () {
        postMessage("pong1");
      });
      postMessage("pong2");
      break;
  }
};