Change8

v42.0.0-alpha.1

📦 electronView on GitHub →
19 features🐛 10 fixes1 deprecations🔧 17 symbols

Summary

This alpha release introduces significant new APIs for Windows notifications, macOS app state checking, and improved MSIX auto-updating. It also changes binary installation to occur dynamically during first launch rather than via a postinstall script.

Migration Steps

  1. If you rely on the postinstall script for binary download, switch to using the install-electron script or rely on the new dynamic download on first launch.
  2. If you are using frameless windows on Wayland (Linux), note that they now have GTK drop shadows by default; set `hasShadow: false` in the window constructor if you require completely undecorated windows.
  3. Review usage of Notification API on Windows to utilize the new `reason` property on the 'closed' event.

✨ New Features

  • Added Notification.handleActivation(callback) API on Windows to handle notification clicks, replies, and action buttons, including cold starts.
  • Added ELECTRON_INSTALL_PLATFORM and ELECTRON_INSTALL_ARCH environment variables to facilitate installing binaries for different platforms/architectures.
  • Added app.isActive() to check if the app is the active/foreground application (macOS only).
  • Added webContents.getOrCreateDevToolsTargetId().
  • Added a disclaim option to the UtilityProcess API for TCC disclaiming on macOS.
  • Added a reason property to the Notification 'closed' event on Windows to indicate dismissal reason.
  • Added an usePrinterDefaultPageSize option to webContents.print() for using the printer's default page size.
  • Added animation functionality to view.setBounds and added view.setBackgroundBlur.
  • Added support for MSIX auto-updating.
  • Added support for --experimental-transform-types.
  • Added support for long-animation-frame script attribution.
  • Added support for importing shared textures using the p010le 10-bit YUV pixel format.
  • Added support for several more safeStorage backends via new asynchronous functionality in safeStorage.
  • Added the ability to disable auto-focusing of WebContents on navigation using webPreferences.focusOnNavigation.
  • Changed offscreen scale factor use 1.0f as default.
  • Electron now downloads its binary into node_modules dynamically on first launch instead of running a postinstall script; added install-electron script to manually trigger download.
  • Enabled wasm trap handlers behind WasmTrapHandlers [fuse].
  • Extended actions support for Windows notifications to include buttons, select dropdowns, and replies.
  • On Wayland (Linux), frameless windows now have GTK drop shadows and extended resize boundaries. Set hasShadow: false in the window constructor for fully frameless windows without decorations.

🐛 Bug Fixes

  • Added validation to protocol client methods to reject protocol names that do not conform to the RFC 3986 URI scheme grammar.
  • Addressed upstream Chromium shift to enable CoreAudio Tap API for audio capture used in electron's desktopCapturer (macOS).
  • Allow dynamically updating menu item labels, sublabels, and icons.
  • Fixed globalShortcut not working on Wayland with GlobalShortcutsPortal feature enabled.
  • Fixed a bug that caused offscreen rendering not to have valid screen info and be unable to get valid result of related media queries; added webPreference.offscreen.deviceScaleFactor to allow user specification.
  • Fixed a crash that could occur when using the File System Access API.
  • Fixed a macOS crash when creating a new tab from the tab overview.
  • Fixed an application crash on MacOS where the menu observer was not being properly removed before garbage collection.
  • Fixed an error with Windows release builds after MSIX merger.
  • Fixed an issue in chrome://accessibility.

Affected Symbols

⚡ Deprecations

  • Replaced deprecated NSUserNotification with User Notifications on macOS.