mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-31 05:39:55 +00:00
This implementation completely ignores MessagePorts, and manually plumbs data through LocalSockets.
19 lines
526 B
HTML
19 lines
526 B
HTML
<script src="../include.js"></script>
|
|
<script>
|
|
asyncTest((done) => {
|
|
let work = new Worker("worker.js");
|
|
let count = 0;
|
|
work.onmessage = (evt) => {
|
|
println("Got message from worker: " + JSON.stringify(evt.data));
|
|
count++;
|
|
work.postMessage({"msg": "marco"});
|
|
if (count === 2) {
|
|
println("DONE");
|
|
work.onmessage = null;
|
|
work.terminate();
|
|
done();
|
|
}
|
|
};
|
|
});
|
|
</script>
|