summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/bug1132395_sharedWorker.js
blob: 988eea10680fd60a558d595e27351a4c9ac37af8 (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/');
  };
}