we don't really need a webContents like that, so pass if needed
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
c4c78c9b3e
commit
727e267853
|
@ -1,8 +1,6 @@
|
||||||
const {clipboard, nativeImage, Menu, MenuItem, shell} = require('electron');
|
const {clipboard, nativeImage, Menu, MenuItem, shell} = require('electron');
|
||||||
const url = require('url');
|
const url = require('url');
|
||||||
|
|
||||||
let webContents;
|
|
||||||
|
|
||||||
const PERMITTED_URL_SCHEMES = [
|
const PERMITTED_URL_SCHEMES = [
|
||||||
'http:',
|
'http:',
|
||||||
'https:',
|
'https:',
|
||||||
|
@ -108,9 +106,7 @@ function onEditableContextMenu(ev, params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
module.exports = (_webContents) => {
|
module.exports = (webContents) => {
|
||||||
webContents = _webContents;
|
|
||||||
|
|
||||||
webContents.on('new-window', onWindowOrNavigate);
|
webContents.on('new-window', onWindowOrNavigate);
|
||||||
webContents.on('will-navigate', onWindowOrNavigate);
|
webContents.on('will-navigate', onWindowOrNavigate);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue