Avoid adding a new option to webPreferences
This commit is contained in:
parent
8f0e594007
commit
31eb793fb0
8 changed files with 8 additions and 28 deletions
|
@ -225,10 +225,7 @@ Object.defineProperty(window.history, 'length', {
|
|||
})
|
||||
|
||||
// The initial visibilityState.
|
||||
let cachedVisibilityState = 'visible'
|
||||
if (process.visibilityState) {
|
||||
cachedVisibilityState = process.visibilityState
|
||||
}
|
||||
let cachedVisibilityState = process.argv.includes('--hidden-page') ? 'hidden' : 'visible'
|
||||
|
||||
// Subscribe to visibilityState changes.
|
||||
ipcRenderer.on('ELECTRON_RENDERER_WINDOW_VISIBILITY_CHANGE', function (event, visibilityState) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue