We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
globalPreload
1 parent 76e4d41 commit 2b30c8bCopy full SHA for 2b30c8b
doc/api/esm.md
@@ -976,14 +976,14 @@ close normally.
976
* and sends the message back to the application context
977
*/
978
export function globalPreload({ port }) {
979
- port.onmessage = (evt) => {
980
- port.postMessage(evt.data);
981
- };
+ port.on('message', (msg) => {
+ port.postMessage(msg);
+ });
982
return `\
983
port.postMessage('console.log("I went to the Loader and back");');
984
985
- eval(evt.data);
986
+ port.on('message', (data) => {
+ eval(data);
987
`;
988
}
989
```
0 commit comments