blob: 1f14334290a3ce8b707cff3b9a01caca952b9863 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
try {
var worker = new Worker("WorkerBasic.js");
worker.onmessage = function(e) {
if (e.data == "Pass") {
postMessage("Pass");
} else if (e.data == "close") {
close();
postMessage("Pass");
}
};
worker.postMessage("start");
} catch (e) {
postMessage("Fail: " + e);
}
|