electron/spec/fixtures/api/native-window-open-blank.html

12 lines
309 B
HTML
Raw Normal View History

<html>
<body>
<script type="text/javascript" charset="utf-8">
const {ipcRenderer} = require("electron");
const popup = window.open();
popup.document.write('<h1>Hello</h1>');
const content = popup.document.querySelector('h1').innerText;
ipcRenderer.send('answer', content);
</script>
</body>
</html>