feat: remove BrowserWindow option inheritance (#28550)
This commit is contained in:
parent
c4931ff70e
commit
4ca518468d
13 changed files with 128 additions and 118 deletions
|
@ -2383,7 +2383,7 @@ describe('BrowserWindow module', () => {
|
|||
}
|
||||
});
|
||||
let childWc: WebContents | null = null;
|
||||
w.webContents.setWindowOpenHandler(() => ({ action: 'allow', overrideBrowserWindowOptions: { webPreferences: { preload } } }));
|
||||
w.webContents.setWindowOpenHandler(() => ({ action: 'allow', overrideBrowserWindowOptions: { webPreferences: { preload, contextIsolation: false } } }));
|
||||
|
||||
w.webContents.on('did-create-window', (win) => {
|
||||
childWc = win.webContents;
|
||||
|
@ -2598,6 +2598,10 @@ describe('BrowserWindow module', () => {
|
|||
preload
|
||||
}
|
||||
});
|
||||
w.webContents.setWindowOpenHandler(() => ({
|
||||
action: 'allow',
|
||||
overrideBrowserWindowOptions: { show: false, webPreferences: { contextIsolation: false, webviewTag: true, nativeWindowOpen: true, nodeIntegrationInSubFrames: true } }
|
||||
}));
|
||||
w.webContents.once('new-window', (event, url, frameName, disposition, options) => {
|
||||
options.show = false;
|
||||
});
|
||||
|
@ -2676,7 +2680,9 @@ describe('BrowserWindow module', () => {
|
|||
action: 'allow',
|
||||
overrideBrowserWindowOptions: {
|
||||
webPreferences: {
|
||||
preload: path.join(fixtures, 'api', 'window-open-preload.js')
|
||||
preload: path.join(fixtures, 'api', 'window-open-preload.js'),
|
||||
contextIsolation: false,
|
||||
nodeIntegrationInSubFrames: true
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue