platform/electron/browser-window
Classes
Section titled “Classes”BrowserWindowController
Section titled “BrowserWindowController”Defined in: app/src/platform/electron/browser-window.ts:191
One browser window: a BaseWindow with the shell view and one WebContentsView per
tab. Tab views are created when a tab opens and destroyed when it closes; only the
active tab’s view is attached to the window. Web pages and internal pages use views of
different sessions: when a tab switches between them, its view is replaced and the old
view’s history is kept for Back and Forward.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BrowserWindowController(
options,place?):BrowserWindowController
Defined in: app/src/platform/electron/browser-window.ts:224
Parameters
Section titled “Parameters”options
Section titled “options”Environment of the window.
place?
Section titled “place?”WindowPlace = {}
Returns
Section titled “Returns”Properties
Section titled “Properties”isPrivate
Section titled “isPrivate”
readonlyisPrivate:boolean
Defined in: app/src/platform/electron/browser-window.ts:215
Whether the window is a private window.
overlay
Section titled “overlay”overlay:
OverlayHandle|undefined
Defined in: app/src/platform/electron/browser-window.ts:197
The overlay while it shows something; a change of the visible tab closes it.
readonlypopup:boolean
Defined in: app/src/platform/electron/browser-window.ts:213
Whether the window is a popup that a page opened.
readonlyshell:WebContentsView
Defined in: app/src/platform/electron/browser-window.ts:193
readonlytabs:TabService
Defined in: app/src/platform/electron/browser-window.ts:194
window
Section titled “window”
readonlywindow:BaseWindow
Defined in: app/src/platform/electron/browser-window.ts:192
Accessors
Section titled “Accessors”activeTabContents
Section titled “activeTabContents”Get Signature
Section titled “Get Signature”get activeTabContents():
WebContents|undefined
Defined in: app/src/platform/electron/browser-window.ts:306
The WebContents of the active tab, if any.
Returns
Section titled “Returns”WebContents | undefined
closing
Section titled “closing”Get Signature
Section titled “Get Signature”get closing():
boolean
Defined in: app/src/platform/electron/browser-window.ts:296
Whether the window closes: a window that closes right after it opened hides first.
Returns
Section titled “Returns”boolean
shellContents
Section titled “shellContents”Get Signature
Section titled “Get Signature”get shellContents():
WebContents
Defined in: app/src/platform/electron/browser-window.ts:301
The shell’s WebContents.
Returns
Section titled “Returns”WebContents
Methods
Section titled “Methods”adopt()
Section titled “adopt()”adopt(
contents,url,activate):string
Defined in: app/src/platform/electron/browser-window.ts:407
Shows the page that a script of another page opened in a new tab, which keeps that page as its opener.
Parameters
Section titled “Parameters”contents
Section titled “contents”WebContents
The new page, which Chromium made for the script.
string
The address it opens.
activate
Section titled “activate”boolean
Whether the tab becomes the active one.
Returns
Section titled “Returns”string
The tab.
countBlocked()
Section titled “countBlocked()”countBlocked(
contentsId):boolean
Defined in: app/src/platform/electron/browser-window.ts:349
Counts a request that the content blocker blocked, if it belongs to one of this window’s tabs.
Parameters
Section titled “Parameters”contentsId
Section titled “contentsId”number
Id of the web contents that made the request.
Returns
Section titled “Returns”boolean
Whether the request belonged to this window.
create()
Section titled “create()”create(
id,url,lazy?):void
Defined in: app/src/platform/electron/browser-window.ts:382
Creates the view of a tab and loads the URL. A lazy tab gets its view only when it is shown, so restored tabs cost nothing until they are used.
Parameters
Section titled “Parameters”string
string
boolean = false
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”destroy()
Section titled “destroy()”destroy(
id):void
Defined in: app/src/platform/electron/browser-window.ts:489
Destroys the view of a tab.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”dispose()
Section titled “dispose()”dispose():
void
Defined in: app/src/platform/electron/browser-window.ts:561
Closes the window and every tab view.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”execute()
Section titled “execute()”execute(
command):void
Defined in: app/src/platform/electron/browser-window.ts:577
Runs a window command, such as opening a tab.
Parameters
Section titled “Parameters”command
Section titled “command”The command.
Returns
Section titled “Returns”void
find()
Section titled “find()”find(
id,query,forward,next):void
Defined in: app/src/platform/electron/browser-window.ts:693
Looks for text in a tab’s page, or for its next or previous match.
Parameters
Section titled “Parameters”string
The tab.
string
The text.
forward
Section titled “forward”boolean
Whether to look forward.
boolean
Whether to go on from the current match.
Returns
Section titled “Returns”void
focusContent()
Section titled “focusContent()”focusContent():
void
Defined in: app/src/platform/electron/browser-window.ts:478
Focuses the visible tab, or the shell for the new tab page, where typing goes to the address bar.
Returns
Section titled “Returns”void
load()
Section titled “load()”load(
id,url):void
Defined in: app/src/platform/electron/browser-window.ts:505
Loads a URL in a tab.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”openPage()
Section titled “openPage()”openPage(
page):void
Defined in: app/src/platform/electron/browser-window.ts:762
Shows an internal page: the tab that already shows it, or else the active tab if it shows the new tab page, or else a new tab.
Parameters
Section titled “Parameters”"newtab" | "settings" | "setup" | "history" | "bookmarks"
The page.
Returns
Section titled “Returns”void
ownsTab()
Section titled “ownsTab()”ownsTab(
contents):boolean
Defined in: app/src/platform/electron/browser-window.ts:370
Tells whether a WebContents is one of this window’s tab views.
Parameters
Section titled “Parameters”contents
Section titled “contents”WebContents
Returns
Section titled “Returns”boolean
proceedUnsafely()
Section titled “proceedUnsafely()”proceedUnsafely(
id,accept):void
Defined in: app/src/platform/electron/browser-window.ts:447
Continues to a page whose certificate was refused, once the certificate is accepted.
Parameters
Section titled “Parameters”string
The tab.
accept
Section titled “accept”(contents) => boolean
Accepts the certificate that the page’s web contents were refused.
Returns
Section titled “Returns”void
refreshShell()
Section titled “refreshShell()”refreshShell():
void
Defined in: app/src/platform/electron/browser-window.ts:339
Sends the shell its state again, for example after the layout settings changed.
Returns
Section titled “Returns”void
repaintBackground()
Section titled “repaintBackground()”repaintBackground():
void
Defined in: app/src/platform/electron/browser-window.ts:548
Paints the window and the views of internal pages in the current light or dark mode.
Returns
Section titled “Returns”void
run(
id,action):void
Defined in: app/src/platform/electron/browser-window.ts:521
Runs a history or loading action.
Parameters
Section titled “Parameters”string
action
Section titled “action”"back" | "forward" | "reload" | "stop"
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”setInsets()
Section titled “setInsets()”setInsets(
insets):void
Defined in: app/src/platform/electron/browser-window.ts:364
Updates the space the shell occupies.
Parameters
Section titled “Parameters”insets
Section titled “insets”New insets in CSS pixels.
Returns
Section titled “Returns”void
show()
Section titled “show()”show(
id):void
Defined in: app/src/platform/electron/browser-window.ts:416
Shows the view of a tab and hides the previously shown one.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”state()
Section titled “state()”state():
object
Defined in: app/src/platform/electron/browser-window.ts:312
The current shell state, as sent to the shell.
Returns
Section titled “Returns”object
activeTabId
Section titled “activeTabId”activeTabId:
string|null
bookmarksBar
Section titled “bookmarksBar”bookmarksBar:
object[] |null
downloads
Section titled “downloads”downloads: {
active:number;progress:number|null; } |null
find: {
active:number;matches:number;query:string; } |null
private
Section titled “private”private:
boolean
tabs:
object[]
tabStrip
Section titled “tabStrip”tabStrip:
"left"|"top"|"bottom"|"right"
stopFind()
Section titled “stopFind()”stopFind(
id):void
Defined in: app/src/platform/electron/browser-window.ts:711
Closes the find bar and leaves the current match selected.
Parameters
Section titled “Parameters”string
The tab.
Returns
Section titled “Returns”void
tabIdOf()
Section titled “tabIdOf()”tabIdOf(
contents):string|undefined
Defined in: app/src/platform/electron/browser-window.ts:378
Finds the tab that a WebContents shows.
Parameters
Section titled “Parameters”contents
Section titled “contents”WebContents
A tab view’s WebContents.
Returns
Section titled “Returns”string | undefined
zoom()
Section titled “zoom()”zoom(
id,direction):void
Defined in: app/src/platform/electron/browser-window.ts:726
Zooms a tab’s page in or out by one step, or back to 100 %. The zoom holds for the page’s site, in every tab, and is remembered for the next visit.
Parameters
Section titled “Parameters”string
The tab.
direction
Section titled “direction”-1 | 0 | 1
1 to zoom in, -1 to zoom out, 0 for 100 %.
Returns
Section titled “Returns”void
WindowManager
Section titled “WindowManager”Defined in: app/src/platform/electron/browser-window.ts:1136
Keeps track of open windows and routes shell requests to the right one.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new WindowManager(
options):WindowManager
Defined in: app/src/platform/electron/browser-window.ts:1150
Parameters
Section titled “Parameters”options
Section titled “options”Environment for new windows.
Returns
Section titled “Returns”Properties
Section titled “Properties”onDidChange
Section titled “onDidChange”
readonlyonDidChange:Event<void>
Defined in: app/src/platform/electron/browser-window.ts:1143
Fires after windows opened or closed, or their tabs changed.
onDidMove
Section titled “onDidMove”
readonlyonDidMove:Event<void>
Defined in: app/src/platform/electron/browser-window.ts:1146
Fires while a window moves or changes its size.
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get all(): readonly
BrowserWindowController[]
Defined in: app/src/platform/electron/browser-window.ts:1321
All open windows.
Returns
Section titled “Returns”readonly BrowserWindowController[]
lastUsed
Section titled “lastUsed”Get Signature
Section titled “Get Signature”get lastUsed():
BrowserWindowController|undefined
Defined in: app/src/platform/electron/browser-window.ts:1288
The open window that had the focus last, or else the newest open window.
Returns
Section titled “Returns”BrowserWindowController | undefined
Methods
Section titled “Methods”countBlocked()
Section titled “countBlocked()”countBlocked(
contentsId):void
Defined in: app/src/platform/electron/browser-window.ts:1329
Counts a request that the content blocker blocked in the tab that made it.
Parameters
Section titled “Parameters”contentsId
Section titled “contentsId”number
Id of the web contents that made the request.
Returns
Section titled “Returns”void
dispose()
Section titled “dispose()”dispose():
void
Defined in: app/src/platform/electron/browser-window.ts:1350
Closes every window.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”forShell()
Section titled “forShell()”forShell(
sender):BrowserWindowController|undefined
Defined in: app/src/platform/electron/browser-window.ts:1308
Finds the window whose shell sent a request.
Parameters
Section titled “Parameters”sender
Section titled “sender”WebContents
The sending WebContents.
Returns
Section titled “Returns”BrowserWindowController | undefined
forTab()
Section titled “forTab()”forTab(
contents):BrowserWindowController|undefined
Defined in: app/src/platform/electron/browser-window.ts:1316
Finds the window that shows a tab view.
Parameters
Section titled “Parameters”contents
Section titled “contents”WebContents
A tab’s WebContents.
Returns
Section titled “Returns”BrowserWindowController | undefined
lastUsedOf()
Section titled “lastUsedOf()”lastUsedOf(
privateWindow):BrowserWindowController|undefined
Defined in: app/src/platform/electron/browser-window.ts:1298
The regular or the private window that had the focus last, or else the newest one; popups are left out, as their pages expect to be alone in them.
Parameters
Section titled “Parameters”privateWindow
Section titled “privateWindow”boolean
Whether to find a private window.
Returns
Section titled “Returns”BrowserWindowController | undefined
open()
Section titled “open()”open(
url?,place?):BrowserWindowController
Defined in: app/src/platform/electron/browser-window.ts:1159
Opens a window with one tab.
Parameters
Section titled “Parameters”string
What the tab shows; a new tab page without it.
place?
Section titled “place?”Where the window opens, and whether it is private.
Returns
Section titled “Returns”openPopup()
Section titled “openPopup()”openPopup(
contents,url,features,opener,privateWindow):BrowserWindowController
Defined in: app/src/platform/electron/browser-window.ts:1189
Opens a popup that a script of a page opened, where and as large as the page asked, with the new page, which keeps its opener.
Parameters
Section titled “Parameters”contents
Section titled “contents”WebContents
The new page.
string
The address it opens.
features
Section titled “features”string
The features that the script asked for, such as its size.
opener
Section titled “opener”BrowserWindowController | undefined
The window of the page that opened it.
privateWindow
Section titled “privateWindow”boolean
Whether the page that opened it is in a private window.
Returns
Section titled “Returns”The popup.
openWith()
Section titled “openWith()”openWith(
contents,url,place?):BrowserWindowController
Defined in: app/src/platform/electron/browser-window.ts:1173
Opens a window whose only tab shows a page that a script of another page opened, which keeps its opener.
Parameters
Section titled “Parameters”contents
Section titled “contents”WebContents
The new page.
string
The address it opens.
place?
Section titled “place?”WindowPlace = {}
Where the window opens.
Returns
Section titled “Returns”The window.
refreshShells()
Section titled “refreshShells()”refreshShells():
void
Defined in: app/src/platform/electron/browser-window.ts:1336
Sends every shell its state again.
Returns
Section titled “Returns”void
repaintBackgrounds()
Section titled “repaintBackgrounds()”repaintBackgrounds():
void
Defined in: app/src/platform/electron/browser-window.ts:1343
Paints every window in the current light or dark mode.
Returns
Section titled “Returns”void
restore()
Section titled “restore()”restore(
session):BrowserWindowController
Defined in: app/src/platform/electron/browser-window.ts:1214
Opens the windows of a stored session. Only the active tab of each window loads; the others load when they are shown.
Parameters
Section titled “Parameters”session
Section titled “session”The windows and their tabs.
version
Section titled “version”1 = ...
windows
Section titled “windows”object[] = ...
Returns
Section titled “Returns”The first window.
snapshot()
Section titled “snapshot()”snapshot():
object
Defined in: app/src/platform/electron/browser-window.ts:1236
The tabs of every open window, as a session keeps them.
Returns
Section titled “Returns”object
version
Section titled “version”version:
1
windows
Section titled “windows”windows:
object[]
toDisposable()
Section titled “toDisposable()”toDisposable():
Disposable
Defined in: app/src/platform/electron/browser-window.ts:1358
Returns a disposable that closes all windows.
Returns
Section titled “Returns”Interfaces
Section titled “Interfaces”BrowserWindowOptions
Section titled “BrowserWindowOptions”Defined in: app/src/platform/electron/browser-window.ts:65
Everything a window needs from its environment.
Properties
Section titled “Properties”appearanceArgument
Section titled “appearanceArgument”
readonlyappearanceArgument: () =>string
Defined in: app/src/platform/electron/browser-window.ts:85
Command line argument that gives a view of the browser’s own UI its design tokens.
Returns
Section titled “Returns”string
backgroundColor
Section titled “backgroundColor”
readonlybackgroundColor: (privateWindow) =>string
Defined in: app/src/platform/electron/browser-window.ts:83
Window background while the shell loads: for the light or dark mode, or a private window.
Parameters
Section titled “Parameters”privateWindow
Section titled “privateWindow”boolean
Returns
Section titled “Returns”string
blocking
Section titled “blocking”
readonlyblocking: (url) =>Blocking
Defined in: app/src/platform/electron/browser-window.ts:91
Whether the content blocker works on a page: none for pages it never touches.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”bookmarksBar?
Section titled “bookmarksBar?”
readonlyoptionalbookmarksBar?: () =>object[] |null
Defined in: app/src/platform/electron/browser-window.ts:99
The items of the bookmarks bar, or null while the bar is hidden.
Returns
Section titled “Returns”object[] | null
certificateOverride?
Section titled “certificateOverride?”
readonlyoptionalcertificateOverride?: () =>boolean
Defined in: app/src/platform/electron/browser-window.ts:120
Whether people may continue to a site whose certificate is not trusted.
Returns
Section titled “Returns”boolean
downloads?
Section titled “downloads?”
readonlyoptionaldownloads?: (privateWindow) => {active:number;progress:number|null; } |null
Defined in: app/src/platform/electron/browser-window.ts:103
How the downloads button of a regular or a private window looks, or null while it is hidden.
Parameters
Section titled “Parameters”privateWindow
Section titled “privateWindow”boolean
Returns
Section titled “Returns”{ active: number; progress: number | null; } | null
readonlygate:IpcGate
Defined in: app/src/platform/electron/browser-window.ts:114
internalPartition
Section titled “internalPartition”
readonlyinternalPartition:string
Defined in: app/src/platform/electron/browser-window.ts:75
Partition of the browser’s own views.
isBookmarked?
Section titled “isBookmarked?”
readonlyoptionalisBookmarked?: (url) =>boolean
Defined in: app/src/platform/electron/browser-window.ts:95
Whether a page has a bookmark, for the star in the address bar.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
languageArguments
Section titled “languageArguments”
readonlylanguageArguments: readonlystring[]
Defined in: app/src/platform/electron/browser-window.ts:87
Command line arguments that give the views of the browser’s own UI their language.
logger
Section titled “logger”
readonlylogger:Logger
Defined in: app/src/platform/electron/browser-window.ts:116
newTabUrl
Section titled “newTabUrl”
readonlynewTabUrl:string
Defined in: app/src/platform/electron/browser-window.ts:81
URL of a new tab.
onContextMenu?
Section titled “onContextMenu?”
readonlyoptionalonContextMenu?: (request) =>void
Defined in: app/src/platform/electron/browser-window.ts:118
Shows the context menu of a view; without it, views have none.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”void
onFocus?
Section titled “onFocus?”
readonlyoptionalonFocus?: () =>void
Defined in: app/src/platform/electron/browser-window.ts:113
Called when a window gets the focus.
Returns
Section titled “Returns”void
onPageCommand?
Section titled “onPageCommand?”
readonlyoptionalonPageCommand?: (window,command,contents) =>void
Defined in: app/src/platform/electron/browser-window.ts:122
Prints, saves or shows the source of a web page, or opens its developer tools.
Parameters
Section titled “Parameters”window
Section titled “window”command
Section titled “command”contents
Section titled “contents”WebContents
Returns
Section titled “Returns”void
onPrivateWindowsClosed?
Section titled “onPrivateWindowsClosed?”
readonlyoptionalonPrivateWindowsClosed?: () =>void
Defined in: app/src/platform/electron/browser-window.ts:111
Called after the last private window closed, to forget what private windows kept.
Returns
Section titled “Returns”void
onUnresponsive?
Section titled “onUnresponsive?”
readonlyoptionalonUnresponsive?: (window,tabId,contents) =>void
Defined in: app/src/platform/electron/browser-window.ts:132
Asks what to do about a web page that stopped responding to input.
Parameters
Section titled “Parameters”window
Section titled “window”string
contents
Section titled “contents”WebContents
Returns
Section titled “Returns”void
onVisit?
Section titled “onVisit?”
readonlyoptionalonVisit?: (url,title,titleOnly) =>void
Defined in: app/src/platform/electron/browser-window.ts:93
Called when a tab shows a web page, and again when its title changes.
Parameters
Section titled “Parameters”string
string
titleOnly
Section titled “titleOnly”boolean
Returns
Section titled “Returns”void
onZoom?
Section titled “onZoom?”
readonlyoptionalonZoom?: (url,factor) =>void
Defined in: app/src/platform/electron/browser-window.ts:130
Remembers the zoom factor of a site.
Parameters
Section titled “Parameters”string
factor
Section titled “factor”number
Returns
Section titled “Returns”void
openPrivateWindow?
Section titled “openPrivateWindow?”
readonlyoptionalopenPrivateWindow?: () =>void
Defined in: app/src/platform/electron/browser-window.ts:109
Opens a new private window, if people may.
Returns
Section titled “Returns”void
openWindow?
Section titled “openWindow?”
readonlyoptionalopenWindow?: () =>void
Defined in: app/src/platform/electron/browser-window.ts:107
Opens a new window.
Returns
Section titled “Returns”void
pagePreload
Section titled “pagePreload”
readonlypagePreload:string
Defined in: app/src/platform/electron/browser-window.ts:73
Path of the preload script of internal pages in tabs.
prepareInternalPage?
Section titled “prepareInternalPage?”
readonlyoptionalprepareInternalPage?: (page) =>Promise<void> |undefined
Defined in: app/src/platform/electron/browser-window.ts:141
Gets the browser process ready for an internal page before the page loads, such as by
loading the handlers of its channels; undefined when it is ready already.
Parameters
Section titled “Parameters”"newtab" | "settings" | "setup" | "history" | "bookmarks"
Returns
Section titled “Returns”Promise<void> | undefined
privateSession
Section titled “privateSession”
readonlyprivateSession: () =>Session
Defined in: app/src/platform/electron/browser-window.ts:79
The session of web tabs in private windows, which keeps their data in memory.
Returns
Section titled “Returns”Session
router
Section titled “router”
readonlyrouter:IpcRouter
Defined in: app/src/platform/electron/browser-window.ts:115
shellOrigin
Section titled “shellOrigin”
readonlyshellOrigin:string
Defined in: app/src/platform/electron/browser-window.ts:69
Origin the shell page must have.
shellPreload
Section titled “shellPreload”
readonlyshellPreload:string
Defined in: app/src/platform/electron/browser-window.ts:71
Path of the shell’s preload script.
shellUrl
Section titled “shellUrl”
readonlyshellUrl:string
Defined in: app/src/platform/electron/browser-window.ts:67
URL of the shell page, normally app://shell/.
showDownloads?
Section titled “showDownloads?”
readonlyoptionalshowDownloads?: (window) =>void
Defined in: app/src/platform/electron/browser-window.ts:105
Shows the list of downloads of a window, at its button.
Parameters
Section titled “Parameters”window
Section titled “window”Returns
Section titled “Returns”void
tabStripPosition
Section titled “tabStripPosition”
readonlytabStripPosition: () =>"left"|"top"|"bottom"|"right"
Defined in: app/src/platform/electron/browser-window.ts:89
Where the shell shows the tab strip.
Returns
Section titled “Returns”"left" | "top" | "bottom" | "right"
toggleBookmark?
Section titled “toggleBookmark?”
readonlyoptionaltoggleBookmark?: (url,title) =>void
Defined in: app/src/platform/electron/browser-window.ts:97
Adds a bookmark for a page, or removes its bookmarks.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”void
toggleBookmarksBar?
Section titled “toggleBookmarksBar?”
readonlyoptionaltoggleBookmarksBar?: () =>void
Defined in: app/src/platform/electron/browser-window.ts:101
Shows or hides the bookmarks bar.
Returns
Section titled “Returns”void
webPartition
Section titled “webPartition”
readonlywebPartition:string
Defined in: app/src/platform/electron/browser-window.ts:77
Partition of web tabs.
zoomFor?
Section titled “zoomFor?”
readonlyoptionalzoomFor?: (url) =>number|undefined
Defined in: app/src/platform/electron/browser-window.ts:128
The zoom factor that a site was left at, to give its pages again.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”number | undefined
ContextMenuRequest
Section titled “ContextMenuRequest”Defined in: app/src/platform/electron/browser-window.ts:51
A view’s request for its context menu, with what the menu needs to know about the view.
Properties
Section titled “Properties”bounds
Section titled “bounds”
readonlybounds:Rectangle
Defined in: app/src/platform/electron/browser-window.ts:61
Where the view is in the window, for menus opened with the keyboard.
contents
Section titled “contents”
readonlycontents:WebContents
Defined in: app/src/platform/electron/browser-window.ts:57
The view’s web contents.
params
Section titled “params”
readonlyparams:ContextMenuParams
Defined in: app/src/platform/electron/browser-window.ts:59
What was clicked, as Chromium reports it.
readonlytabId:string|undefined
Defined in: app/src/platform/electron/browser-window.ts:55
The tab whose page was clicked; undefined for the shell.
window
Section titled “window”
readonlywindow:BrowserWindowController
Defined in: app/src/platform/electron/browser-window.ts:53
The window that shows the view.
Insets
Section titled “Insets”Defined in: app/src/platform/electron/browser-window.ts:43
Space the shell occupies at the window edges.
Properties
Section titled “Properties”bottom
Section titled “bottom”
readonlybottom:number
Defined in: app/src/platform/electron/browser-window.ts:46
readonlyleft:number
Defined in: app/src/platform/electron/browser-window.ts:47
readonlyright:number
Defined in: app/src/platform/electron/browser-window.ts:45
readonlytop:number
Defined in: app/src/platform/electron/browser-window.ts:44
OverlayHandle
Section titled “OverlayHandle”Defined in: app/src/platform/electron/browser-window.ts:153
What a window needs of its overlay.
Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Defined in: app/src/platform/electron/browser-window.ts:155
Closes the overlay and gives the focus back to the page or the shell.
Returns
Section titled “Returns”void
WindowPlace
Section titled “WindowPlace”Defined in: app/src/platform/electron/browser-window.ts:159
Where a window opens, and whether it is a popup that a page opened.
Properties
Section titled “Properties”bounds?
Section titled “bounds?”
readonlyoptionalbounds?:WindowBounds
Defined in: app/src/platform/electron/browser-window.ts:160
maximized?
Section titled “maximized?”
readonlyoptionalmaximized?:boolean
Defined in: app/src/platform/electron/browser-window.ts:161
popup?
Section titled “popup?”
readonlyoptionalpopup?:boolean
Defined in: app/src/platform/electron/browser-window.ts:163
A popup closes with its last tab and is not kept in the session.
private?
Section titled “private?”
readonlyoptionalprivate?:boolean
Defined in: app/src/platform/electron/browser-window.ts:165
A private window keeps no history and no session, and its pages’ data only in memory.
Type Aliases
Section titled “Type Aliases”PageCommand
Section titled “PageCommand”PageCommand =
"page.print"|"page.save"|"page.source"|"devtools.toggle"
Defined in: app/src/platform/electron/browser-window.ts:145
The commands that tools outside the window carry out on a web page.