Skip to content

Instantly share code, notes, and snippets.

@rhysd
Last active April 19, 2017 11:20
Show Gist options
  • Save rhysd/1dcf61cf42b822e2044372e353d3519f to your computer and use it in GitHub Desktop.
Save rhysd/1dcf61cf42b822e2044372e353d3519f to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<body>
<a href="https://github.com" rel="noopener" target="_blank">link</a>
</body>
</html>
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();
});
});
{
"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