mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: Allow creation of new window to be customizable. (#41432)
This commit is contained in:
4
typings/internal-electron.d.ts
vendored
4
typings/internal-electron.d.ts
vendored
@@ -77,7 +77,7 @@ declare namespace Electron {
|
||||
equal(other: WebContents): boolean;
|
||||
browserWindowOptions: BrowserWindowConstructorOptions;
|
||||
_windowOpenHandler: ((details: Electron.HandlerDetails) => any) | null;
|
||||
_callWindowOpenHandler(event: any, details: Electron.HandlerDetails): {browserWindowConstructorOptions: Electron.BrowserWindowConstructorOptions | null, outlivesOpener: boolean};
|
||||
_callWindowOpenHandler(event: any, details: Electron.HandlerDetails): {browserWindowConstructorOptions: Electron.BrowserWindowConstructorOptions | null, outlivesOpener: boolean, createWindow?: Electron.CreateWindowFunction};
|
||||
_setNextChildWebPreferences(prefs: Partial<Electron.BrowserWindowConstructorOptions['webPreferences']> & Pick<Electron.BrowserWindowConstructorOptions, 'backgroundColor'>): void;
|
||||
_send(internal: boolean, channel: string, args: any): boolean;
|
||||
_sendInternal(channel: string, ...args: any[]): void;
|
||||
@@ -112,6 +112,8 @@ declare namespace Electron {
|
||||
embedder?: Electron.WebContents;
|
||||
type?: 'backgroundPage' | 'window' | 'browserView' | 'remote' | 'webview' | 'offscreen';
|
||||
}
|
||||
|
||||
type CreateWindowFunction = (options: BrowserWindowConstructorOptions) => WebContents;
|
||||
|
||||
interface Menu {
|
||||
_init(): void;
|
||||
|
||||
Reference in New Issue
Block a user