summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/fileBlobSubWorker_worker.js
blob: 2dc8cd12da237b3f88439f70d60a59818b739e3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/**
 * Expects a blob. Returns an object containing the size, type.
 *  Used to test posting of blob from worker to worker.
 */
onmessage = function(event) {
  var worker = new Worker("fileBlob_worker.js");

  worker.postMessage(event.data);

  worker.onmessage = function(event) {
    postMessage(event.data);
  }

  worker.onerror = function(event) {
    postMessage(undefined);
  }
};