blob: 21fbc3454530d314ea70b78889ec2a3ff5236b1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/**
* Expects a file. Returns an object containing the size, type, name and path
* using another worker. Used to test posting of file from worker to worker.
*/
onmessage = function(event) {
var worker = new Worker("file_worker.js");
worker.postMessage(event.data);
worker.onmessage = function(event) {
postMessage(event.data);
}
worker.onerror = function(event) {
postMessage(undefined);
}
};
|