Don't allow webPreferences to be overrideden in features string
This commit is contained in:
parent
7726c7c6c4
commit
507f60e33e
1 changed files with 4 additions and 0 deletions
|
@ -202,6 +202,10 @@ ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_OPEN', (event, url, frameName,
|
|||
if (value === undefined) {
|
||||
additionalFeatures.push(key)
|
||||
} else {
|
||||
// Don't allow webPreferences to be set since it must be an object
|
||||
// that cannot be directly overridden
|
||||
if (key === 'webPreferences') return
|
||||
|
||||
if (webPreferences.includes(key)) {
|
||||
if (options.webPreferences == null) {
|
||||
options.webPreferences = {}
|
||||
|
|
Loading…
Reference in a new issue