10 lines
322 B
HTML
10 lines
322 B
HTML
<script>
|
|
const child = window.open(`./window-open-postMessage.html`, '', 'show=no')
|
|
window.onmessage = (e) => {
|
|
if (e.data === 'ready') {
|
|
child.postMessage('testing', '*')
|
|
} else {
|
|
require('electron').ipcRenderer.send('complete', {eventOrigin: e.origin, ...JSON.parse(e.data)})
|
|
}
|
|
}
|
|
</script>
|