Fix JS style in test HTMLs

This commit is contained in:
Ryohei Ikegami 2017-04-30 19:43:21 +09:00
parent 3c5179b717
commit da97150fc9
4 changed files with 17 additions and 17 deletions

View file

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

View file

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

View file

@ -1,10 +1,10 @@
<html> <html>
<body> <body>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
const popup = window.open(); const popup = window.open()
popup.document.write('<h1>Hello</h1>'); popup.document.write('<h1>Hello</h1>')
const content = popup.document.querySelector('h1').innerText; const content = popup.document.querySelector('h1').innerText
window.postMessage(content, '*'); window.postMessage(content, '*')
</script> </script>
</body> </body>
</html> </html>

View file

@ -1,9 +1,9 @@
<html> <html>
<body> <body>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
const {ipcRenderer} = require("electron"); const {ipcRenderer} = require('electron')
const runas = require('runas'); const runas = require('runas')
ipcRenderer.send('answer', typeof runas); ipcRenderer.send('answer', typeof runas)
</script> </script>
</body> </body>
</html> </html>