Disable all webviews, since we never intend to create them (#2114)
This commit is contained in:
parent
8bd37b7f8d
commit
6e86bf238e
1 changed files with 7 additions and 0 deletions
7
main.js
7
main.js
|
@ -497,6 +497,13 @@ app.on('activate', () => {
|
|||
}
|
||||
});
|
||||
|
||||
// Defense in depth. We never intend to open webviews, so this prevents it completely.
|
||||
app.on('web-contents-created', (createEvent, win) => {
|
||||
win.on('will-attach-webview', (attachEvent) => {
|
||||
attachEvent.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
ipc.on('set-badge-count', (event, count) => {
|
||||
app.setBadgeCount(count);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue