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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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(); event.preventDefault();
}); });
} }