v42.0.0-alpha.2
📦 electronView on GitHub →
✨ 20 features🐛 9 fixes⚡ 1 deprecations🔧 14 symbols
Summary
This alpha release introduces significant new APIs for Windows notifications, macOS app state checking, and utility process configuration. It also modernizes binary installation by moving away from postinstall scripts and includes numerous fixes across platform APIs.
Migration Steps
- If you rely on the `postinstall` script to fetch Electron binaries, note that this is now handled dynamically on first launch. You can manually trigger the download using the new `install-electron` script if needed.
✨ 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 application is the active/foreground application (macOS only).
- Added `id` and `groupId` options to the Notification constructor on macOS for custom identification and visual grouping.
- 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 indicating why the notification was dismissed.
- Added an `usePrinterDefaultPageSize` option to `webContents.print()`.
- Added animation functionality to `view.setBounds` and added `view.setBackgroundBlur`.
- Added support for MSIX auto-updating.
- Added support for `--experimental-transform-types` flag.
- 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.
- Added the ability to disable auto-focusing of WebContents on navigation using `webPreferences.focusOnNavigation`.
- Changed offscreen scale factor default use to `1.0f`.
- Electron now downloads its binary into `node_modules` dynamically on first launch, removing the reliance on a `postinstall` script. Added `install-electron` script to manually trigger download.
- Enabled wasm trap handlers behind the `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` for fully frameless windows without decorations.
🐛 Bug Fixes
- Added additional ASAR support to several `fs` copy methods.
- Added validation to protocol client methods to reject protocol names not conforming to RFC 3986 URI scheme grammar.
- Addressed upstream Chromium shift to enable `CoreAudio Tap API` for audio capture used in `desktopCapturer` on macOS.
- Allowed dynamically updating menu item labels, sublabels, and icons.
- Fixed `globalShortcut` not working on Wayland when `GlobalShortcutsPortal` feature is enabled.
- Fixed an issue where offscreen rendering lacked valid screen info, preventing correct media query results. Added `webPreference.offscreen.deviceScaleFactor` to allow specifying the scale factor.
- 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 (details truncated).
Affected Symbols
Notification.handleActivationapp.isActiveNotification constructor (macOS)webContents.getOrCreateDevToolsTargetIdUtilityProcess APINotification 'closed' event (Windows)webContents.printview.setBoundsview.setBackgroundBlurwebPreferences.focusOnNavigationsafeStoragedesktopCapturerglobalShortcutwebPreference.offscreen.deviceScaleFactor
⚡ Deprecations
- Replaced deprecated NSUserNotification with User Notifications on macOS.