feat: add more info in setWindowOpenHandler details (#28518)
* fix: invoke the window open handler for _blank links * feat: add disposition to setWindowOpenHandler details * fix: pass postData to new-window event * postData can be heterogeneous * fix type of postBody * fix type of UploadFile and UploadRawData to be discriminated unions * exclude the empty string from additionalFeatures * add a test * add postBody and referrer to setWindowOpenHandler args * appease typescript * Update api-browser-window-spec.ts * update snapshots
This commit is contained in:
parent
b6315612dd
commit
dba4df9326
16 changed files with 152 additions and 65 deletions
4
typings/internal-electron.d.ts
vendored
4
typings/internal-electron.d.ts
vendored
|
@ -69,8 +69,8 @@ declare namespace Electron {
|
|||
equal(other: WebContents): boolean;
|
||||
_initiallyShown: boolean;
|
||||
browserWindowOptions: BrowserWindowConstructorOptions;
|
||||
_windowOpenHandler: ((opts: {url: string, frameName: string, features: string}) => any) | null;
|
||||
_callWindowOpenHandler(event: any, url: string, frameName: string, rawFeatures: string): Electron.BrowserWindowConstructorOptions | null;
|
||||
_windowOpenHandler: ((details: Electron.HandlerDetails) => any) | null;
|
||||
_callWindowOpenHandler(event: any, details: Electron.HandlerDetails): Electron.BrowserWindowConstructorOptions | null;
|
||||
_setNextChildWebPreferences(prefs: Partial<Electron.BrowserWindowConstructorOptions['webPreferences']> & Pick<Electron.BrowserWindowConstructorOptions, 'backgroundColor'>): void;
|
||||
_send(internal: boolean, channel: string, args: any): boolean;
|
||||
_sendToFrameInternal(frameId: number | [number, number], channel: string, ...args: any[]): boolean;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue