mirror of
https://github.com/electron/electron.git
synced 2026-01-26 15:58:07 -05:00
13 lines
365 B
HTML
13 lines
365 B
HTML
<html>
|
|
<body>
|
|
<script type="text/javascript" charset="utf-8">
|
|
const {ipcRenderer} = require('electron')
|
|
// Pass a random parameter to create independent worker.
|
|
let worker = new SharedWorker(`../workers/shared_worker_node.js?a={Math.random()}`)
|
|
worker.port.onmessage = function (event) {
|
|
ipcRenderer.sendToHost(event.data)
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|