3 // Once content sends us a port connected to the mochitest, we simply echo every
4 // message we receive back to content and the mochitest.
5 onmessage
= ({ data
: { mochitestPort
} }) => {
6 onmessage
= ({ data
}) => {
7 // Send a message to both content and the mochitest, which the main thread's
8 // event loop will attempt to deliver as step 2).
9 postMessage(`worker echo to content: ${data}`);
10 mochitestPort
.postMessage(`worker echo to port: ${data}`);