refactor: use types for once() return values in spec (#38872)
This commit is contained in:
parent
abec9ead06
commit
9226cc662b
11 changed files with 85 additions and 85 deletions
|
@ -182,7 +182,7 @@ describe('webContents.setWindowOpenHandler', () => {
|
|||
it('can change webPreferences of child windows', async () => {
|
||||
browserWindow.webContents.setWindowOpenHandler(() => ({ action: 'allow', overrideBrowserWindowOptions: { webPreferences: { defaultFontSize: 30 } } }));
|
||||
|
||||
const didCreateWindow = once(browserWindow.webContents, 'did-create-window');
|
||||
const didCreateWindow = once(browserWindow.webContents, 'did-create-window') as Promise<[BrowserWindow, Electron.DidCreateWindowDetails]>;
|
||||
browserWindow.webContents.executeJavaScript("window.open('about:blank', '', 'show=no') && true");
|
||||
const [childWindow] = await didCreateWindow;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue