parent
4f38419e33
commit
f96a81a818
|
@ -27,7 +27,7 @@ Running this command will:
|
||||||
// Create a new
|
// Create a new
|
||||||
const worker = new Worker('./app.worker', { type: 'module' });
|
const worker = new Worker('./app.worker', { type: 'module' });
|
||||||
worker.onmessage = ({ data }) => {
|
worker.onmessage = ({ data }) => {
|
||||||
console.log('page got message: $\{data\}');
|
console.log(`page got message: ${data}`);
|
||||||
};
|
};
|
||||||
worker.postMessage('hello');
|
worker.postMessage('hello');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue