new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

Electron · all subjects

window customization

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

BrowserWindow.getTrafficLightPosition removed, use getWindowButtonPosition

`BrowserWindow.getTrafficLightPosition()` has been removed. Use `BrowserWindow.getWindowButtonPosition()` instead. The new API returns `null` instead of `{ x: 0, y: 0 }` when there is no custom position.

macOS vibrancy options removed

The following vibrancy options have been removed on macOS: 'light', 'medium-light', 'dark', 'ultra-dark', 'appearance-based'. These were previously deprecated and have been removed by Apple in 10.15.

Draggable regions on macOS behavior changed

The implementation of draggable regions using CSS property `-webkit-app-region: drag` has changed on macOS to align with Windows and Linux. A `drag` region on top of a `no-drag` region will now correctly cause the region to be draggable, instead of the `no-drag` region taking precedence. Additionally, the `customButtonsOnHover` BrowserWindow property previously created a draggable region; this has been fixed to respect the `-webkit-app-region` CSS property.

skipTaskbar removed on Linux

On X11, `skipTaskbar` sends a `_NET_WM_STATE_SKIP_TASKBAR` message to the X11 window manager. There is not a direct equivalent for Wayland, so Electron is unable to support this feature on Linux.

nativeWindowOpen defaults to true in Electron 15

In Electron 15, `nativeWindowOpen` is no longer experimental and is now the default. Prior to this, `window.open` was by default shimmed to use `BrowserWindowProxy`, which meant `window.open('about:blank')` did not work to open synchronously scriptable child windows.

window.open frameName parameter no longer sets title

The optional parameter `frameName` in `window.open()` will no longer set the title of the window. This now follows the native specification. To set the window title, use `win.setTitle(title)` instead.

BrowserWindow constructor options no longer inherited from parent window

Prior to Electron 14, windows opened with `window.open` inherited BrowserWindow constructor options such as `transparent` and `resizable` from their parent window. Beginning with Electron 14, this no longer happens. Instead, explicitly set options for the new window using `setWindowOpenHandler`.

setWindowOpenHandler example with overrideBrowserWindowOptions

Example of using setWindowOpenHandler to set options for new windows: `webContents.setWindowOpenHandler((details) => { return { action: 'allow', overrideBrowserWindowOptions: { /* ... */ } } })`.

additionalFeatures removed from new-window and did-create-window events

The deprecated `additionalFeatures` property in the `new-window` and `did-create-window` events of WebContents has been removed. Bare keys in window features now present as keys with the value `true` in the options object. Use `details.options['my-key']` instead of `details.additionalFeatures.includes('my-key')`.

Give your agent this brain