BaseWindow Module
Types and nested modules
| Type/Module | Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Emitted when the window is set or unset to show always on top of other windows. |
|
|
⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ✔ | MAS ❌ Emitted when an App Command is invoked. These are typically related to keyboard media keys or browser commands, as well as the "Back" button built into some mice on Windows.Commands are lowercased, underscores are replaced with hyphens, and the APPCOMMAND_ prefix is stripped off. e.g. APPCOMMAND_BROWSER_BACKWARD is emitted as browser-backward.The following app commands are explicitly supported on Linux:* browser-backward* browser-forward |
|
|
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ Emitted on trackpad rotation gesture. Continually emitted until rotation gesture is ended. The rotation value on each emission is the angle in degrees rotated since the last emission. The last emitted event upon a rotation gesture will always be of value 0. Counter-clockwise rotation values are positive, while clockwise ones are negative. |
|
|
⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ Emitted on 3-finger swipe. Possible directions are up, right, down, left.The method underlying this event is built to handle older macOS-style trackpad swiping, where the content on the screen doesn't move with the swipe. Most macOS trackpads are not configured to allow this kind of swiping anymore, so in order for it to emit properly the 'Swipe between pages' preference in System Preferences > Trackpad > More Gestures must be set to 'Swipe with two or three fingers'. |
|
|
⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ✔ | MAS ❌ Emitted when the system context menu is triggered on the window, this is normally only triggered when the user right clicks on the non-client area of your window. This is the window titlebar or any area you have declared as -webkit-app-region: drag in a frameless window.Calling event.preventDefault() will prevent the menu from being displayed.To convert point to DIP, use screen.screenToDipPoint(point). |
|
|
⚠ OS Compatibility: WIN ✔ | MAC ✔ | LIN ❌ | MAS ❌ Emitted before the window is moved. On Windows, calling event.preventDefault() will prevent the window from being moved.Note that this is only emitted when the window is being moved manually. Moving the window with setPosition/setBounds/center will not emit this event. |
|
|
⚠ OS Compatibility: WIN ✔ | MAC ✔ | LIN ❌ | MAS ❌ Emitted before the window is resized. Calling event.preventDefault() will prevent the window from being resized.Note that this is only emitted when the window is being resized manually. Resizing the window with setBounds/setSize will not emit this event.The possible values and behaviors of the edge option are platform dependent. Possible values are:* On Windows, possible values are bottom, top, left, right, top-left, top-right, bottom-left, bottom-right.* On macOS, possible values are bottom and right. * The value bottom is used to denote vertical resizing. * The value right is used to denote horizontal resizing. |
fable-electron-docs-api