Add spec for useNativeWindowOpen
This commit is contained in:
parent
319a7759d0
commit
6bbfe89f96
2 changed files with 28 additions and 0 deletions
11
spec/fixtures/api/native-window-open.html
vendored
Normal file
11
spec/fixtures/api/native-window-open.html
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
<html>
|
||||
<body>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
const {ipcRenderer} = require("electron");
|
||||
const otherWin = window.open();
|
||||
otherWin.document.write("<h1>Hello</h1>");
|
||||
const content = otherWin.document.querySelector("h1").innerText;
|
||||
ipcRenderer.send('answer', content);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue