Header menu logo fable-electron-docs-api

WindowOpenHandlerResponse Type

Constructors

Constructor Description

WindowOpenHandlerResponse(action, ?overrideBrowserWindowOptions, ?outlivesOpener, ?createWindow)

Full Usage: WindowOpenHandlerResponse(action, ?overrideBrowserWindowOptions, ?outlivesOpener, ?createWindow)

Parameters:
    action : Action - Can be allow or deny. Controls whether new window should be created.
    ?overrideBrowserWindowOptions : BrowserWindowConstructorOptions - Allows customization of the created window.
    ?outlivesOpener : bool - By default, child windows are closed when their opener is closed. This can be changed by specifying outlivesOpener: true, in which case the opened window will not be closed when its opener is closed.
    ?createWindow : BrowserWindowConstructorOptions -> WebContents - If specified, will be called instead of new BrowserWindow to create the new child window and event did-create-window will not be emitted. Constructed child window should use passed options object. This can be used for example to have the new window open as a BrowserView instead of in a separate window.

Returns: WindowOpenHandlerResponse
action : Action

Can be allow or deny. Controls whether new window should be created.

?overrideBrowserWindowOptions : BrowserWindowConstructorOptions

Allows customization of the created window.

?outlivesOpener : bool

By default, child windows are closed when their opener is closed. This can be changed by specifying outlivesOpener: true, in which case the opened window will not be closed when its opener is closed.

?createWindow : BrowserWindowConstructorOptions -> WebContents

If specified, will be called instead of new BrowserWindow to create the new child window and event did-create-window will not be emitted. Constructed child window should use passed options object. This can be used for example to have the new window open as a BrowserView instead of in a separate window.

Returns: WindowOpenHandlerResponse

Instance members

Instance member Description

this.action

Full Usage: this.action

Can be allow or deny. Controls whether new window should be created.

this.createWindow

Full Usage: this.createWindow

If specified, will be called instead of new BrowserWindow to create the new child window and event did-create-window will not be emitted. Constructed child window should use passed options object. This can be used for example to have the new window open as a BrowserView instead of in a separate window.

this.outlivesOpener

Full Usage: this.outlivesOpener

By default, child windows are closed when their opener is closed. This can be changed by specifying outlivesOpener: true, in which case the opened window will not be closed when its opener is closed.

this.overrideBrowserWindowOptions

Full Usage: this.overrideBrowserWindowOptions

Allows customization of the created window.

Type something to start searching.