Created
November 1, 2018 15:50
-
-
Save jkleinsc/bf55ecc157b5e4d4a69a0a07e0ac0610 to your computer and use it in GitHub Desktop.
Electron Fiddle Gist
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
<html> | |
<head>tester</head> | |
<body> | |
Click on the page to trigger print. | |
</body> | |
<script> | |
document.addEventListener('click', function(evt) { | |
window.print(); | |
}) | |
</script> | |
</html> |
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. | |
win = new BrowserWindow({ width: 800, height: 600 }) | |
// and load the index.html of the app. | |
win.loadFile('index.html') | |
} | |
app.on('ready', 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
// This file is required by the index.html file and will | |
// be executed in the renderer process for that window. | |
// All of the Node.js APIs are available in this process. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment