Skip to content

ElectronBrowserWindow.fromWebContents method

ElectronBrowserWindow › fromWebContents

Unofficial

Returns the window that owns the given webContents.

Signature:

fromWebContents(webContents: ElectronWebContents): ElectronBrowserWindow | null

Parameters:

Parameter Type Description
webContents ElectronWebContents The web contents to look up.

Returns: ElectronBrowserWindow | nullThe owning BrowserWindow or null if the contents are not owned by a window.