Last active
March 22, 2020 18:32
-
-
Save wisniewski94/20ac0a588d7bde00705d6ac81a27bd0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { app, BrowserWindow } = require('electron') | |
function createWindow () { | |
// Create the browser window. | |
let win = new BrowserWindow({ | |
width: 800, | |
height: 600, | |
webPreferences: { | |
nodeIntegration: true | |
} | |
}) | |
// and load the index.html of the app. | |
win.loadFile('index.html') | |
} | |
app.whenReady().then(createWindow) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag --> | |
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" /> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
We are using node <script>document.write(process.versions.node)</script>, | |
Chrome <script>document.write(process.versions.chrome)</script>, | |
and Electron <script>document.write(process.versions.electron)</script>. | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment