| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 76e4d41 commit 2b30c8b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -976,14 +976,14 @@ close normally. | |||
| 976 | 976 | * and sends the message back to the application context | |
| 977 | 977 | */ | |
| 978 | 978 | export function globalPreload({ port }) { | |
| 979 | - port.onmessage = (evt) => { | ||
| 980 | - port.postMessage(evt.data); | ||
| 981 | - }; | ||
| 979 | + port.on('message', (msg) => { | ||
| 980 | + port.postMessage(msg); | ||
| 981 | + }); | ||
| 982 | 982 | return `\ | |
| 983 | 983 | port.postMessage('console.log("I went to the Loader and back");'); | |
| 984 | - port.onmessage = (evt) => { | ||
| 985 | - eval(evt.data); | ||
| 986 | - }; | ||
| 984 | + port.on('message', (data) => { | ||
| 985 | + eval(data); | ||
| 986 | + }); | ||
| 987 | 987 | `; | |
| 988 | 988 | } | |
| 989 | 989 | ``` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments