Disable all webviews, since we never intend to create them (#2114)
This commit is contained in:

committed by
Scott Nonnenberg

parent
8bd37b7f8d
commit
6e86bf238e
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) => {
|
ipc.on('set-badge-count', (event, count) => {
|
||||||
app.setBadgeCount(count);
|
app.setBadgeCount(count);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user