summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/bug1132395_sharedWorker.js
blob: 851c7f7f6ce1aacc38bf5bb65d18fe7363e213b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
dump("SW created\n");
onconnect = function (evt) {
  dump("SW onconnect\n");
  evt.ports[0].onmessage = function (e) {
    dump("SW onmessage\n");
    var blob = new Blob(["123"], { type: "text/plain" });
    dump("SW blob created\n");
    var url = URL.createObjectURL(blob);
    dump("SW url created: " + url + "\n");
    evt.ports[0].postMessage("alive \\o/");
  };
};