native-window-open-file.html 327 B

12345678910111213
  1. <html>
  2. <body>
  3. <script type="text/javascript" charset="utf-8">
  4. const {ipcRenderer} = require('electron')
  5. const popup = window.open('native-window-open-child.html')
  6. popup.onload = () => {
  7. const content = popup.document.querySelector('h1').innerText
  8. ipcRenderer.send('answer', content)
  9. }
  10. </script>
  11. </body>
  12. </html>