electron-135: added code comments

This commit is contained in:
Vishwas Shashidhar 2017-10-06 16:00:50 +05:30
parent d3706d6b6d
commit 49775e543d

View File

@ -355,6 +355,9 @@ function doCreateMainWindow(initialUrl, initialBounds) {
});
});
// In case we navigate to an external link from inside a pop-out,
// we open that link in an external browser rather than creating
// a new window
browserWin.webContents.on('new-window', (childEvent, childWinUrl) => {
childEvent.preventDefault();
openUrlInDefaultBrower(childWinUrl);