Skip to content

Instantly share code, notes, and snippets.

@jkleinsc
Created November 1, 2018 15:50
Show Gist options
  • Save jkleinsc/bf55ecc157b5e4d4a69a0a07e0ac0610 to your computer and use it in GitHub Desktop.
Save jkleinsc/bf55ecc157b5e4d4a69a0a07e0ac0610 to your computer and use it in GitHub Desktop.
Electron Fiddle Gist
<html>
<head>tester</head>
<body>
Click on the page to trigger print.
</body>
<script>
document.addEventListener('click', function(evt) {
window.print();
})
</script>
</html>
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 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