allow trusted urls to open new windows (#1062)

This commit is contained in:
Dean Whillier
2019-10-09 09:45:02 -04:00
committed by GitHub
parent e1f64f0ba0
commit da4ae94c8b

View File

@@ -413,7 +413,10 @@ function handleAppWebContentsCreated(dc, contents) {
}
});
contents.on('new-window', (event) => {
contents.on('new-window', (event, url) => {
if (isTrustedURL(url)) {
return;
}
event.preventDefault();
});
}