summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/file_worker.js
blob: 6ed8fe181645db8528c3b96a5a481ff1dca9b24a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
 * Expects a file. Returns an object containing the size, type, name and path.
 */
onmessage = function (event) {
  var file = event.data;

  var rtnObj = new Object();

  rtnObj.size = file.size;
  rtnObj.type = file.type;
  rtnObj.name = file.name;
  rtnObj.path = file.path;
  rtnObj.lastModified = file.lastModified;

  postMessage(rtnObj);
};