electron/spec/fixtures/pages/window-open-postMessage-driver.html

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
362 B
HTML
Raw Normal View History

<script>
const child = window.open(`./window-open-postMessage.html`, '', 'show=no,nodeIntegration=yes,contextIsolation=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>