worker.html 293 B

12345678910111213
  1. <html>
  2. <body>
  3. <script type="text/javascript" charset="utf-8">
  4. const {ipcRenderer} = require('electron')
  5. let worker = new Worker(`../workers/worker_node.js`)
  6. worker.onmessage = function (event) {
  7. ipcRenderer.sendToHost(event.data)
  8. worker.terminate()
  9. }
  10. </script>
  11. </body>
  12. </html>