Open _blank links in browser window
This commit is contained in:
parent
3bf804011b
commit
738fc9e217
1 changed files with 5 additions and 0 deletions
|
|
@ -135,6 +135,11 @@ function createWindow() {
|
|||
mainWindow.on("closed", function() {
|
||||
mainWindow = null; // Dereference the window object
|
||||
});
|
||||
|
||||
mainWindow.webContents.on("new-window", function(event, url) {
|
||||
event.preventDefault();
|
||||
electron.shell.openExternal(url);
|
||||
});
|
||||
}
|
||||
|
||||
// Some APIs can only be used after this event occurs.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue