1
0
Fork 0
firefox/dom/workers/test/fileSubWorker_worker.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

17 lines
420 B
JavaScript

/**
* 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 (msg) {
postMessage(msg.data);
};
worker.onerror = function (error) {
postMessage(undefined);
};
};