main: prevent new window spawn when middle click on a link, prevent loading a file on drag&drop
This commit is contained in:
parent
743d76c442
commit
4170830e54
1 changed files with 3 additions and 0 deletions
|
|
@ -38,6 +38,9 @@ module.exports = function(options={}) {
|
|||
}
|
||||
})
|
||||
|
||||
window.webContents.on('will-navigate', (event) => event.preventDefault())
|
||||
window.webContents.on('new-window', (event) => event.preventDefault())
|
||||
|
||||
if (options.fullscreen) {
|
||||
window.webContents.on('dom-ready', ()=>{
|
||||
window.webContents.executeJavaScript(`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue