allow trusted urls to open new windows (#1062)
This commit is contained in:
@@ -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();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user