summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/file_worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/workers/test/file_worker.js')
-rw-r--r--dom/workers/test/file_worker.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/dom/workers/test/file_worker.js b/dom/workers/test/file_worker.js
new file mode 100644
index 000000000..23233b8ac
--- /dev/null
+++ b/dom/workers/test/file_worker.js
@@ -0,0 +1,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.lastModifiedDate = file.lastModifiedDate;
+
+ postMessage(rtnObj);
+};