Skip to content

ElectronWindow

Unofficial

Extended Electron BrowserWindow with internal properties.

Import:

import type { ElectronWindow } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface ElectronWindow extends ElectronBrowserWindow

Extends: ElectronBrowserWindow

Properties

PropertyTypeDescription
_browserViewsunknownInternal browser views attached to the window.
_eventsunknownInternal event handlers map.
_eventsCountunknownNumber of registered event handlers.
accessibleTitlestringAn alternative title provided only to accessibility tools such as screen readers. This string is not directly visible to users.
(Inherited from ElectronBrowserWindow)
autoHideMenuBarbooleanWhether the window menu bar should hide itself automatically.
(Inherited from ElectronBrowserWindow)
closablebooleanWhether the window can be manually closed by user. On Linux the setter is a no-op.
(Inherited from ElectronBrowserWindow)
devToolsWebContentsunknownWeb contents for the developer tools panel.
documentEditedbooleanWhether the window's document has been edited (macOS only).
(Inherited from ElectronBrowserWindow)
excludedFromShownWindowsMenubooleanWhether the window is excluded from the application's Windows menu (macOS only).
(Inherited from ElectronBrowserWindow)
focusablebooleanWhether the window is focusable (macOS and Windows).
(Inherited from ElectronBrowserWindow)
fullScreenbooleanWhether the window is in fullscreen mode.
(Inherited from ElectronBrowserWindow)
fullScreenablebooleanWhether the maximize/zoom window button toggles fullscreen mode or maximizes the window.
(Inherited from ElectronBrowserWindow)
idnumberThe unique identifier of the window, unique among all BrowserWindow instances of the entire application.
(Inherited from ElectronBrowserWindow)
kioskbooleanWhether the window is in kiosk mode.
(Inherited from ElectronBrowserWindow)
maximizablebooleanWhether the window can be manually maximized by user. On Linux the setter is a no-op.
(Inherited from ElectronBrowserWindow)
menuBarVisiblebooleanWhether the menu bar should be visible (Windows and Linux).
(Inherited from ElectronBrowserWindow)
minimizablebooleanWhether the window can be manually minimized by user. On Linux the setter is a no-op.
(Inherited from ElectronBrowserWindow)
movablebooleanWhether the window can be moved by user. On Linux the setter is a no-op.
(Inherited from ElectronBrowserWindow)
representedFilenamestringThe pathname of the file the window represents (macOS only).
(Inherited from ElectronBrowserWindow)
resizablebooleanWhether the window can be manually resized by user.
(Inherited from ElectronBrowserWindow)
shadowbooleanWhether the window has a shadow.
(Inherited from ElectronBrowserWindow)
simpleFullScreenbooleanWhether the window is in simple (pre-Lion) fullscreen mode.
(Inherited from ElectronBrowserWindow)
titlestringThe title of the native window.
(Inherited from ElectronBrowserWindow)
visibleOnAllWorkspacesbooleanWhether the window is visible on all workspaces. Always returns false on Windows.
(Inherited from ElectronBrowserWindow)
webContentsElectronWebContentsThe web contents owned by this window. All web page related events and operations will be done via it.
(Inherited from ElectronBrowserWindow)

Methods

MethodReturnsDescription
addBrowserView(browserView)voidReplacement API for setBrowserView supporting work with multi browser views.
(Inherited from ElectronBrowserWindow)
addListener(event, listener)thisRegisters a listener for the given window event.
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addListener(event, listener)this
(Inherited from ElectronBrowserWindow)
addTabbedWindow(browserWindow)voidAdds a window as a tab on this window, after the tab for the window instance (macOS only).
(Inherited from ElectronBrowserWindow)
blur()voidRemoves focus from the window.
(Inherited from ElectronBrowserWindow)
blurWebView()voidRemoves focus from the web view.
(Inherited from ElectronBrowserWindow)
capturePage(rect?)Promise<ElectronNativeImage>Captures a snapshot of the page within rect. Omitting rect will capture the whole visible page.
(Inherited from ElectronBrowserWindow)
center()voidMoves window to the center of the screen.
(Inherited from ElectronBrowserWindow)
close()voidTries to close the window. This has the same effect as a user manually clicking the close button.
(Inherited from ElectronBrowserWindow)
closeFilePreview()voidCloses the currently open Quick Look panel (macOS only).
(Inherited from ElectronBrowserWindow)
destroy()voidForce-closes the window; the unload and beforeunload events won't be emitted, but closed is guaranteed.
(Inherited from ElectronBrowserWindow)
flashFrame(flag)voidStarts or stops flashing the window to attract user's attention.
(Inherited from ElectronBrowserWindow)
focus()voidFocuses on the window.
(Inherited from ElectronBrowserWindow)
focusOnWebView()voidFocuses on the web view.
(Inherited from ElectronBrowserWindow)
fromBrowserView(browserView)ElectronBrowserWindow | nullReturns the window that owns the given browserView.
(Inherited from ElectronBrowserWindow)
fromId(id)ElectronBrowserWindow | nullReturns the window with the given id.
(Inherited from ElectronBrowserWindow)
fromWebContents(webContents)ElectronBrowserWindow | nullReturns the window that owns the given webContents.
(Inherited from ElectronBrowserWindow)
getAllWindows()ElectronBrowserWindow[]Returns all opened browser windows.
(Inherited from ElectronBrowserWindow)
getBackgroundColor()stringReturns the background color of the window in Hex (#RRGGBB) format.
(Inherited from ElectronBrowserWindow)
getBounds()ElectronRectangleReturns the bounds of the window.
(Inherited from ElectronBrowserWindow)
getBrowserView()ElectronBrowserView | nullReturns the BrowserView attached to this window.
(Inherited from ElectronBrowserWindow)
getBrowserViews()ElectronBrowserView[]Returns all views attached with addBrowserView or setBrowserView.
(Inherited from ElectronBrowserWindow)
getChildWindows()ElectronBrowserWindow[]Returns all child windows.
(Inherited from ElectronBrowserWindow)
getContentBounds()ElectronRectangleReturns the bounds of the window's client area.
(Inherited from ElectronBrowserWindow)
getContentSize()number[]Returns the window's client area's width and height.
(Inherited from ElectronBrowserWindow)
getFocusedWindow()ElectronBrowserWindow | nullReturns the window that is focused in this application.
(Inherited from ElectronBrowserWindow)
getMaximumSize()number[]Returns the window's maximum width and height.
(Inherited from ElectronBrowserWindow)
getMediaSourceId()stringReturns the window id in the format of DesktopCapturerSource's id.
(Inherited from ElectronBrowserWindow)
getMinimumSize()number[]Returns the window's minimum width and height.
(Inherited from ElectronBrowserWindow)
getNativeWindowHandle()BufferReturns the platform-specific handle of the window.
(Inherited from ElectronBrowserWindow)
getNormalBounds()ElectronRectangleReturns the window bounds of the normal state, regardless of the current window state.
(Inherited from ElectronBrowserWindow)
getOpacity()numberReturns the opacity of the window, between 0.0 (fully transparent) and 1.0 (fully opaque). On Linux, always returns 1.
(Inherited from ElectronBrowserWindow)
getParentWindow()ElectronBrowserWindow | nullReturns the parent window.
(Inherited from ElectronBrowserWindow)
getPosition()number[]Returns the window's current position.
(Inherited from ElectronBrowserWindow)
getRepresentedFilename()stringReturns the pathname of the file the window represents (macOS only).
(Inherited from ElectronBrowserWindow)
getSize()number[]Returns the window's width and height.
(Inherited from ElectronBrowserWindow)
getTitle()stringReturns the title of the native window.
(Inherited from ElectronBrowserWindow)
getTrafficLightPosition()ElectronPointReturns the custom position for the traffic light buttons in a frameless window (macOS only).
(Inherited from ElectronBrowserWindow)
hasShadow()booleanReturns whether the window has a shadow.
(Inherited from ElectronBrowserWindow)
hide()voidHides the window.
(Inherited from ElectronBrowserWindow)
hookWindowMessage(message, callback)voidHooks a windows message. The callback is called when the message is received in the WndProc (Windows only).
(Inherited from ElectronBrowserWindow)
isAlwaysOnTop()booleanReturns whether the window is always on top of other windows.
(Inherited from ElectronBrowserWindow)
isClosable()booleanReturns whether the window can be manually closed by user. On Linux always returns true (macOS and Windows).
(Inherited from ElectronBrowserWindow)
isDestroyed()booleanReturns whether the window has been destroyed.
(Inherited from ElectronBrowserWindow)
isDocumentEdited()booleanReturns whether the window's document has been edited (macOS only).
(Inherited from ElectronBrowserWindow)
isEnabled()booleanReturns whether the window is enabled.
(Inherited from ElectronBrowserWindow)
isFocusable()voidReturns whether the window can be focused (macOS and Windows).
(Inherited from ElectronBrowserWindow)
isFocused()booleanReturns whether the window is focused.
(Inherited from ElectronBrowserWindow)
isFullScreen()booleanReturns whether the window is in fullscreen mode.
(Inherited from ElectronBrowserWindow)
isFullScreenable()booleanReturns whether the maximize/zoom window button toggles fullscreen mode or maximizes the window.
(Inherited from ElectronBrowserWindow)
isKiosk()booleanReturns whether the window is in kiosk mode.
(Inherited from ElectronBrowserWindow)
isMaximizable()booleanReturns whether the window can be manually maximized by user. On Linux always returns true (macOS and Windows).
(Inherited from ElectronBrowserWindow)
isMaximized()booleanReturns whether the window is maximized.
(Inherited from ElectronBrowserWindow)
isMenuBarAutoHide()booleanReturns whether the menu bar automatically hides itself.
(Inherited from ElectronBrowserWindow)
isMenuBarVisible()booleanReturns whether the menu bar is visible.
(Inherited from ElectronBrowserWindow)
isMinimizable()booleanReturns whether the window can be manually minimized by user. On Linux always returns true (macOS and Windows).
(Inherited from ElectronBrowserWindow)
isMinimized()booleanReturns whether the window is minimized.
(Inherited from ElectronBrowserWindow)
isModal()booleanReturns whether the current window is a modal window.
(Inherited from ElectronBrowserWindow)
isMovable()booleanReturns whether the window can be moved by user. On Linux always returns true (macOS and Windows).
(Inherited from ElectronBrowserWindow)
isNormal()booleanReturns whether the window is in normal state (not maximized, not minimized, not in fullscreen mode).
(Inherited from ElectronBrowserWindow)
isResizable()booleanReturns whether the window can be manually resized by user.
(Inherited from ElectronBrowserWindow)
isSimpleFullScreen()booleanReturns whether the window is in simple (pre-Lion) fullscreen mode (macOS only).
(Inherited from ElectronBrowserWindow)
isTabletMode()booleanReturns whether the window is in Windows 10 tablet mode (Windows only).
(Inherited from ElectronBrowserWindow)
isVisible()booleanReturns whether the window is visible to the user.
(Inherited from ElectronBrowserWindow)
isVisibleOnAllWorkspaces()booleanReturns whether the window is visible on all workspaces. Always returns false on Windows.
(Inherited from ElectronBrowserWindow)
isWindowMessageHooked(message)booleanReturns whether the message is hooked (Windows only).
(Inherited from ElectronBrowserWindow)
loadFile(filePath, options?)Promise<void>Loads a file into the window. Same as webContents.loadFile.
(Inherited from ElectronBrowserWindow)
loadURL(url, options?)Promise<void>Loads a URL into the window. Same as webContents.loadURL.
(Inherited from ElectronBrowserWindow)
maximize()voidMaximizes the window. This will also show (but not focus) the window if it isn't being displayed already.
(Inherited from ElectronBrowserWindow)
mergeAllWindows()voidMerges all windows into one window with multiple tabs when native tabs are enabled (macOS only).
(Inherited from ElectronBrowserWindow)
minimize()voidMinimizes the window. On some platforms the minimized window will be shown in the Dock.
(Inherited from ElectronBrowserWindow)
moveAbove(mediaSourceId)voidMoves window above the source window in the sense of z-order.
(Inherited from ElectronBrowserWindow)
moveTabToNewWindow()voidMoves the current tab into a new window if native tabs are enabled and there is more than one tab (macOS only).
(Inherited from ElectronBrowserWindow)
moveTop()voidMoves window to top (z-order) regardless of focus.
(Inherited from ElectronBrowserWindow)
on('always-on-top-changed', listener)thisRegisters a listener for the given window event.
(Inherited from ElectronBrowserWindow)
on('app-command', listener)this
(Inherited from ElectronBrowserWindow)
on('blur', listener)this
(Inherited from ElectronBrowserWindow)
on('close', listener)this
(Inherited from ElectronBrowserWindow)
on('closed', listener)this
(Inherited from ElectronBrowserWindow)
on('enter-full-screen', listener)this
(Inherited from ElectronBrowserWindow)
on('enter-html-full-screen', listener)this
(Inherited from ElectronBrowserWindow)
on('focus', listener)this
(Inherited from ElectronBrowserWindow)
on('hide', listener)this
(Inherited from ElectronBrowserWindow)
on('leave-full-screen', listener)this
(Inherited from ElectronBrowserWindow)
on('leave-html-full-screen', listener)this
(Inherited from ElectronBrowserWindow)
on('maximize', listener)this
(Inherited from ElectronBrowserWindow)
on('minimize', listener)this
(Inherited from ElectronBrowserWindow)
on('move', listener)this
(Inherited from ElectronBrowserWindow)
on('moved', listener)this
(Inherited from ElectronBrowserWindow)
on('new-window-for-tab', listener)this
(Inherited from ElectronBrowserWindow)
on('page-title-updated', listener)this
(Inherited from ElectronBrowserWindow)
on('ready-to-show', listener)this
(Inherited from ElectronBrowserWindow)
on('resize', listener)this
(Inherited from ElectronBrowserWindow)
on('resized', listener)this
(Inherited from ElectronBrowserWindow)
on('responsive', listener)this
(Inherited from ElectronBrowserWindow)
on('restore', listener)this
(Inherited from ElectronBrowserWindow)
on('rotate-gesture', listener)this
(Inherited from ElectronBrowserWindow)
on('scroll-touch-begin', listener)this
(Inherited from ElectronBrowserWindow)
on('scroll-touch-edge', listener)this
(Inherited from ElectronBrowserWindow)
on('scroll-touch-end', listener)this
(Inherited from ElectronBrowserWindow)
on('session-end', listener)this
(Inherited from ElectronBrowserWindow)
on('sheet-begin', listener)this
(Inherited from ElectronBrowserWindow)
on('sheet-end', listener)this
(Inherited from ElectronBrowserWindow)
on('show', listener)this
(Inherited from ElectronBrowserWindow)
on('swipe', listener)this
(Inherited from ElectronBrowserWindow)
on('system-context-menu', listener)this
(Inherited from ElectronBrowserWindow)
on('unmaximize', listener)this
(Inherited from ElectronBrowserWindow)
on('unresponsive', listener)this
(Inherited from ElectronBrowserWindow)
on('will-move', listener)this
(Inherited from ElectronBrowserWindow)
on('will-resize', listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)thisRegisters a one-time listener for the given window event.
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
once(event, listener)this
(Inherited from ElectronBrowserWindow)
previewFile(path, displayName?)voidUses Quick Look to preview a file at a given path (macOS only).
(Inherited from ElectronBrowserWindow)
reload()voidReloads the current page. Same as webContents.reload.
(Inherited from ElectronBrowserWindow)
removeBrowserView(browserView)voidRemoves a view added with addBrowserView or setBrowserView.
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)thisRemoves a listener for the given window event.
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeListener(event, listener)this
(Inherited from ElectronBrowserWindow)
removeMenu()voidRemoves the window's menu bar (Linux and Windows).
(Inherited from ElectronBrowserWindow)
restore()voidRestores the window from minimized state to its previous state.
(Inherited from ElectronBrowserWindow)
selectNextTab()voidSelects the next tab when native tabs are enabled and there are other tabs in the window (macOS only).
(Inherited from ElectronBrowserWindow)
selectPreviousTab()voidSelects the previous tab when native tabs are enabled and there are other tabs in the window (macOS only).
(Inherited from ElectronBrowserWindow)
setAlwaysOnTop(flag, level?, relativeLevel?)voidSets whether the window should show always on top of other windows.
(Inherited from ElectronBrowserWindow)
setAppDetails(options)voidSets the properties for the window's taskbar button (Windows only).
(Inherited from ElectronBrowserWindow)
setAspectRatio(aspectRatio, extraSize?)voidMakes the window maintain an aspect ratio.
(Inherited from ElectronBrowserWindow)
setAutoHideCursor(autoHide)voidControls whether to hide the cursor when typing (macOS only).
(Inherited from ElectronBrowserWindow)
setAutoHideMenuBar(hide)voidSets whether the window menu bar should hide itself automatically.
(Inherited from ElectronBrowserWindow)
setBackgroundColor(backgroundColor)voidSets the background color of the window.
(Inherited from ElectronBrowserWindow)
setBounds(bounds, animate?)voidResizes and moves the window to the supplied bounds. Any properties not supplied default to their current values.
(Inherited from ElectronBrowserWindow)
setBrowserView(browserView)voidSets the view attached to the window.
(Inherited from ElectronBrowserWindow)
setClosable(closable)voidSets whether the window can be manually closed by user. On Linux does nothing (macOS and Windows).
(Inherited from ElectronBrowserWindow)
setContentBounds(bounds, animate?)voidResizes and moves the window's client area to the supplied bounds.
(Inherited from ElectronBrowserWindow)
setContentProtection(enable)voidPrevents the window contents from being captured by other apps (macOS and Windows).
(Inherited from ElectronBrowserWindow)
setContentSize(width, height, animate?)voidResizes the window's client area to width and height.
(Inherited from ElectronBrowserWindow)
setDocumentEdited(edited)voidSpecifies whether the window's document has been edited (macOS only).
(Inherited from ElectronBrowserWindow)
setEnabled(enable)voidDisables or enables the window.
(Inherited from ElectronBrowserWindow)
setFocusable(focusable)voidChanges whether the window can be focused (macOS and Windows).
(Inherited from ElectronBrowserWindow)
setFrameZoomLevel(level)voidSets the zoom level of the window frame.
setFullScreen(flag)voidSets whether the window should be in fullscreen mode.
(Inherited from ElectronBrowserWindow)
setFullScreenable(fullscreenable)voidSets whether the maximize/zoom window button toggles fullscreen mode or maximizes the window.
(Inherited from ElectronBrowserWindow)
setHasShadow(hasShadow)voidSets whether the window should have a shadow.
(Inherited from ElectronBrowserWindow)
setIcon(icon)voidChanges the window icon (Linux and Windows).
(Inherited from ElectronBrowserWindow)
setIgnoreMouseEvents(ignore, options?)voidMakes the window ignore all mouse events.
(Inherited from ElectronBrowserWindow)
setKiosk(flag)voidEnters or leaves kiosk mode.
(Inherited from ElectronBrowserWindow)
setMaximizable(maximizable)voidSets whether the window can be manually maximized by user. On Linux does nothing (macOS and Windows).
(Inherited from ElectronBrowserWindow)
setMaximumSize(width, height)voidSets the maximum size of the window.
(Inherited from ElectronBrowserWindow)
setMenu(menu)voidSets the menu as the window's menu bar (Linux and Windows).
(Inherited from ElectronBrowserWindow)
setMenuBarVisibility(visible)voidSets whether the menu bar should be visible (Linux and Windows).
(Inherited from ElectronBrowserWindow)
setMinimizable(minimizable)voidSets whether the window can be manually minimized by user. On Linux does nothing (macOS and Windows).
(Inherited from ElectronBrowserWindow)
setMinimumSize(width, height)voidSets the minimum size of the window.
(Inherited from ElectronBrowserWindow)
setMovable(movable)voidSets whether the window can be moved by user. On Linux does nothing (macOS and Windows).
(Inherited from ElectronBrowserWindow)
setOpacity(opacity)voidSets the opacity of the window. On Linux, does nothing. Out of bound values are clamped to the [0, 1] range.
(Inherited from ElectronBrowserWindow)
setOverlayIcon(overlay, description)voidSets a 16 x 16 pixel overlay onto the current taskbar icon (Windows only).
(Inherited from ElectronBrowserWindow)
setParentWindow(parent)voidSets the parent window. Passing null will turn the current window into a top-level window.
(Inherited from ElectronBrowserWindow)
setPosition(x, y, animate?)voidMoves the window to x and y.
(Inherited from ElectronBrowserWindow)
setProgressBar(progress, options?)voidSets the progress value in the progress bar. Valid range is [0, 1.0].
(Inherited from ElectronBrowserWindow)
setRepresentedFilename(filename)voidSets the pathname of the file the window represents (macOS only).
(Inherited from ElectronBrowserWindow)
setResizable(resizable)voidSets whether the window can be manually resized by user.
(Inherited from ElectronBrowserWindow)
setShape(rects)voidSets a window shape determining the area within the window where drawing and user interaction are permitted (Linux and Windows).
(Inherited from ElectronBrowserWindow)
setSheetOffset(offsetY, offsetX?)voidChanges the attachment point for sheets on macOS (macOS only).
(Inherited from ElectronBrowserWindow)
setSimpleFullScreen(flag)voidEnters or leaves simple fullscreen mode (macOS only).
(Inherited from ElectronBrowserWindow)
setSize(width, height, animate?)voidResizes the window to width and height.
(Inherited from ElectronBrowserWindow)
setSkipTaskbar(skip)voidMakes the window not show in the taskbar.
(Inherited from ElectronBrowserWindow)
setThumbarButtons(buttons)booleanAdds a thumbnail toolbar with a specified set of buttons to the thumbnail image of a window (Windows only).
(Inherited from ElectronBrowserWindow)
setThumbnailClip(region)voidSets the region of the window to show as the thumbnail image displayed when hovering over the window in the taskbar (Windows only).
(Inherited from ElectronBrowserWindow)
setThumbnailToolTip(toolTip)voidSets the tooltip displayed when hovering over the window thumbnail in the taskbar (Windows only).
(Inherited from ElectronBrowserWindow)
setTitle(title)voidChanges the title of the native window.
(Inherited from ElectronBrowserWindow)
setTitleBarOverlay(options)voidOn a window with Window Controls Overlay already enabled, updates the style of the title bar overlay (Windows only).
(Inherited from ElectronBrowserWindow)
setTopBrowserView(browserView)voidRaises browserView above other views attached to the window.
(Inherited from ElectronBrowserWindow)
setTouchBar(touchBar)voidSets the touch bar layout for the current window. Specifying null or undefined clears the touch bar (macOS only).
(Inherited from ElectronBrowserWindow)
setTrafficLightPosition(position)voidSets a custom position for the traffic light buttons in a frameless window (macOS only).
(Inherited from ElectronBrowserWindow)
setVibrancy(type)voidAdds a vibrancy effect to the browser window. Passing null or an empty string removes the effect (macOS only).
(Inherited from ElectronBrowserWindow)
setVisibleOnAllWorkspaces(visible, options?)voidSets whether the window should be visible on all workspaces. Does nothing on Windows.
(Inherited from ElectronBrowserWindow)
setWindowButtonVisibility(visible)voidSets whether the window traffic light buttons should be visible (macOS only).
(Inherited from ElectronBrowserWindow)
show()voidShows and gives focus to the window.
(Inherited from ElectronBrowserWindow)
showDefinitionForSelection()voidShows the definition for the selected word (macOS only). Same as webContents.showDefinitionForSelection().
(Inherited from ElectronBrowserWindow)
showInactive()voidShows the window but doesn't focus on it.
(Inherited from ElectronBrowserWindow)
toggleTabBar()voidToggles the visibility of the tab bar if native tabs are enabled and there is only one tab (macOS only).
(Inherited from ElectronBrowserWindow)
unhookAllWindowMessages()voidUnhooks all of the window messages (Windows only).
(Inherited from ElectronBrowserWindow)
unhookWindowMessage(message)voidUnhooks the window message (Windows only).
(Inherited from ElectronBrowserWindow)
unmaximize()voidUnmaximizes the window.
(Inherited from ElectronBrowserWindow)

Links to this page: