Window
Properties
The window label. It is a unique identifier for the window, can be used to reference it later.
Local event listeners.
Functions
Clear any applied effects if possible.
Emits an event to all {@link EventTarget|targets} matching the given target.
The position of the top-left hand corner of the window's client area relative to the top-left hand corner of the desktop.
Whether the window is configured to be always on top of other windows or not.
Gets the window's native close button state.
Gets the window's current decorated state.
Gets the window's current fullscreen state.
Gets the window's native maximize button state.
Gets the window's current maximized state.
Gets the window's native minimize button state.
Gets the window's current minimized state.
Gets the window's current resizable state.
Listen to window close requested. Emitted when the user requests to closes the window.
Listen to a file drop event. The listener is triggered when the user hovers the selected files on the webview, drops the files or cancels the operation.
Listen to window focus change.
Listen to window move.
Listen to window resize.
Listen to window scale change. Emitted when the window's scale factor has changed. The following user actions can cause DPI changes:
Listen to the system theme change.
The position of the top-left hand corner of the window relative to the top-left hand corner of the desktop.
Requests user attention to the window, this has no effect if the application is already focused. How requesting for user attention manifests is platform dependent, see UserAttentionType for details.
The scale factor that can be used to map physical pixels to logical pixels.
Whether the window should always be below other windows.
Whether the window should always be on top of other windows.
Sets the window background color.
Sets the badge count. It is app wide and not specific to this window.
Sets the badge cont macOS only.
Sets whether the window's native close button is enabled or not.
Prevents the window contents from being captured by other apps.
Grabs the cursor, preventing it from leaving the window.
Modifies the cursor icon of the window.
Changes the position of the cursor in window coordinates.
Modifies the cursor's visibility.
Whether the window should have borders and bars.
Set window effects.
Enable or disable the window.
Sets whether the window can be focused.
Sets the window fullscreen state.
Sets the window icon.
Changes the cursor events behavior.
Sets whether the window's native maximize button is enabled or not. If resizable is set to false, this setting is ignored.
Sets the window maximum inner size. If the size argument is undefined, the constraint is unset.
Sets whether the window's native minimize button is enabled or not.
Sets the window minimum inner size. If the size argument is not provided, the constraint is unset.
Sets the overlay icon. Windows only The overlay icon can be set for every window.
Sets the window outer position.
Sets the taskbar progress state.
Updates the window resizable flag.
On macOS, Toggles a fullscreen mode that doesn’t require a new macOS space. Returns a boolean indicating whether the transition was successful (this won’t work if the window was already in the native fullscreen). This is how fullscreen used to work on macOS in versions before Lion. And allows the user to have a fullscreen window without using another space or taking control over the entire monitor.
Resizes the window with a new inner size.
Sets the window inner size constraints.
Whether the window icon should be hidden from the taskbar or not.
Sets the title bar style. macOS only.
Sets whether the window should be visible on all workspaces or virtual desktops.
Starts dragging the window.
Starts resize-dragging the window.
Toggles the window maximized state.
Unmaximizes the window.
Unminimizes the window.