1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/workers/test/file_worker.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,17 @@ 1.4 +/** 1.5 + * Expects a file. Returns an object containing the size, type, name and path. 1.6 + */ 1.7 +onmessage = function(event) { 1.8 + var file = event.data; 1.9 + 1.10 + var rtnObj = new Object(); 1.11 + 1.12 + rtnObj.size = file.size; 1.13 + rtnObj.type = file.type; 1.14 + rtnObj.name = file.name; 1.15 + rtnObj.path = file.path; 1.16 + rtnObj.lastModifiedDate = file.lastModifiedDate; 1.17 + rtnObj.mozFullPath = file.mozFullPath; 1.18 + 1.19 + postMessage(rtnObj); 1.20 +};