Last active
April 19, 2017 11:20
-
-
Save rhysd/1dcf61cf42b822e2044372e353d3519f to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
<body> | |
<a href="https://github.com" rel="noopener" target="_blank">link</a> | |
</body> | |
</html> |
This file contains hidden or 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 path = require('path'); | |
const electron = require('electron'); | |
const app = electron.app; | |
const BrowserWindow = electron.BrowserWindow; | |
app.on('ready', () => { | |
const win = new BrowserWindow({ | |
useContentSize: true, | |
autoHideMenuBar: false, | |
webPreferences: { | |
nodeIntegration: false, | |
sandbox: true, | |
partition: 'this-is-test' | |
} | |
}); | |
win.loadURL('file://' + path.join(__dirname, 'index.html')); | |
win.webContents.on('new-window', e => { | |
e.preventDefault(); | |
}); | |
}); |
This file contains hidden or 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
{ | |
"name": "electron-bug", | |
"version": "0.0.0", | |
"main": "main.js" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment