Aller au contenu principal

Electron 41

· 7 mins de lecture

Electron 41 has been released! It includes upgrades to Chromium 146.0.7680.65, V8 14.6, and Node v24.14.0.


The Electron team is excited to announce the release of Electron 41! Vous pouvez l'installer avec npm via npm install electron@latest ou le télécharger sur notre site web de téléchargement de version. Vous obtiendrez plus de détails sur cette version en lisant ce qui suit.

If you have any feedback, please share it with us on Bluesky or Mastodon, or join our community Discord! Les bogues et les demandes de fonctionnalités peuvent être signalés dans l'[outil de suivi des problèmes] d’Electron (https://github.com/electron/electron/issues).

info

After publishing the initial 41.0.0 package, we integrated some high-priority bugs into follow-up patch releases. We recommend installing 41.0.2 when upgrading to Electron 41.

Changements notables

ASAR Integrity digest for improved security

As of Electron 41, macOS Electron apps can now embed a digest of their ASAR Integrity information. This adds an additional layer of tamper detection for apps that use ASAR Integrity by validating the integrity information itself at app launch.

To enable the feature for your app, you can run the following command with @electron/asar v4.1.0 and above:

asar integrity-digest on /path/to/YourApp.app

You must re-sign your app afterwards. For more information, see the @electron/asar CLI documentation.

Support for this feature in Electron Forge is planned for the near future (electron/forge#4159).

Improved Wayland support

On Wayland (Linux), frameless windows now have drop shadows and extended resize boundaries. To create fully frameless windows with no decorations, set hasShadow: false in the window constructor. #49885

Mitchell Cohen is writing a blog article about recent work to improve Electron's support of Wayland and client-side decorations on Linux. Watch this space!

Added support for MSIX auto-updating

The Electron team recently added MSIX auto-updater support according to RFC #21. You can now ship both MSIX and Squirrel.Mac in your update server essentially with the same JSON response format. See the autoUpdater documentation for more information.

This was added in Electron 41 by #49586 and has also been backported to Electron 39.5.0 (#49585) and 40.2.0 (#49587).

Changements de la Stack

Electron 41 upgrades Chromium from 144.0.7559.60 to 146.0.7680.65, Node.js from v24.11.1 to v24.14.0, and V8 from 14.4 to 14.6.

Nouvelles fonctionnalités et améliorations

  • Added --disable-geolocation command-line flag for macOS apps to disable location services. #45934
  • Added NV12 support for import shared texture. #48922 (Also in 40)
  • Added a disclaim option to the utilityProcess API to allow for TCC disclaiming on macOS. #49693 (Also in 39, 40)
  • Added a reason property to the Notification 'closed' event on Windows to allow developers to know the reason the notification was dismissed. #50029 (Also in 40)
  • Added an usePrinterDefaultPageSize option to webContents.print() to allow using the printer's default page size. #49812
  • Added support for WebSocket authentication through the login event on webContents. #48512 (Also in 39, 40)
  • Added support for the Node.js --experimental-transform-types flag. #49882 (Also in 39, 40)
  • Added support for long-animation-frame script attribution (via --enable-features=AlwaysLogLOAFURL). #49773 (Also in 39, 40)
  • Added the ability to disable auto-focusing of WebContents on navigation using webPreferences.focusOnNavigation. #49511 (Also in 40)
  • Irrelevant errors from the Chromium DevTools frontend are now silenced in the main process. #49292 (Also in 40)
  • Enable V8 trap handlers for WASM behind WasmTrapHandlers fuse. #49839
  • Extended actions support for Windows notifications to include buttons, select dropdowns, and replies. #49787 (Also in 40)

Changements majeurs avec rupture de compatibilité

Behavior Changed: PDFs no longer create a separate WebContents

Previously, PDF resources created a separate guest WebContents for rendering. Now, PDFs are rendered within the same WebContents instead. If you have code to detect PDF resources, use the frame tree instead of WebContents.

Under the hood, Chromium enabled a feature that changes PDFs to use out-of-process iframes (OOPIFs) instead of the MimeHandlerViewGuest extension.

We have updated the cookie change cause in the cookie 'changed' event. When a new cookie is set, the change cause is inserted. When a cookie is deleted, the change cause remains explicit. When the cookie being set is identical to an existing one (same name, domain, path, and value, with no actual changes), the change cause is inserted-no-change-overwrite. When the value of the cookie being set remains unchanged but some of its attributes are updated, such as the expiration attribute, the change cause will be inserted-no-value-change-overwrite.

Fin du support pour 38.x.y

Electron 38.x.y a atteint sa fin de support conformément à la politique de support du projet. Nous encourageons les développeurs à mettre à jour vers une version plus récente d'Electron et de faire de même avec leurs applications. See https://releases.electronjs.org/schedule to see the timeline for supported versions of Electron.

Et maintenant ?

À court terme, vous pouvez compter sur l’équipe pour continuer a se concentrer sur le développement des principaux composants qui composent Electron, notamment Chromium, Node et V8.

You can find Electron's public timeline here.

More information about future changes can be found on the Planned Breaking Changes page.