Electron 37.0.0
Electron 37.0.0 est disponible ! Il comprend des mises à jour vers Chromium 138, V8 13.8 et Node.js 22.16.0.
L’équipe Electron est heureuse d’annoncer la sortie d’Electron 37.0.0 ! 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).
Changements notables
Coins arrondis: Squircles CSS natifs
Electron 37 introduces the custom -electron-corner-smoothing
CSS property, which allows apps to create smoother rounded corners to match Apple's macOS design language. This feature originally landed in Electron 36, but we felt like it deserved a brighter spotlight.
Code | Result |
---|---|
|
Contrairement à la propriété standard border-radius
, qui sculpte les coins du quart de cercle à partir d'un rectangle, -electron-corner-smoothing
transforme en douceur
la courbe vers une forme squircle avec un périmètre continu.
You can adjust the smoothness using values from 0% to 100%, or use the system-ui
value to match the operating system's style (60% on macOS and 0% otherwise).
This design enhancement can be applied on borders, outlines, and shadows, giving your app a subtle layer of polish.
Read more about Electron's squircle implementation in @clavin's RFC 0012. The document goes over the motivation and technical implementation in more detail.
The initial design drew inspiration from Figma's corner smoothing implementation. Read more about their own quest for smooth corners in "Desperately seeking squircles".
Changements de la Stack
- Chromium
138.0.7204.35
- Node
22.16.0
- V8
13.8
Electron 37 met à jour Chromium de 136.0.7103.48
à 138.0.7204.35
et V8 de 13.6
à 13.8.
Google Summer of Code Begins
Our two Google Summer of Code contributors have started the program's coding period!
- @nilayarya is crafting a new Save/Restore Window State API in Electron core. The new APIs will provide a built-in, standardized way to handle window state persistence. See Nilay's in-progress RFC at electron/rfcs#16.
- @hitarth-gg is hard at work modernizing the long-dormant Devtron extension using Chrome Manifest V3 APIs. This project will provide tooling for developers to debug IPC communication, track event listeners, and visualize module dependencies in their Electron applications.
It has been an exciting couple of weeks for our GSOC participants, so stay tuned for more updates!
Nouvelles fonctionnalités et améliorations
- Added
innerWidth
andinnerHeight
options forwindow.open
. #47039 (Également en 35, 36) - Added
before-mouse-event
to allow intercepting and preventing mouse events inwebContents
. #47364 (Également en 36) - Added
scriptURL
property toServiceWorkerMain
. #45863 - Added
sublabel
functionality for menus on macOS >= 14.4. #47042 (Également en 35, 36) - Added support for
HIDDevice.collections
. #47483 (Également en 36) - Added support for
--no-experimental-global-navigator
flag. #47418 (Également en 35, 36) - Added support for
screen.dipToScreenPoint(point)
andscreen.screenToDipPoint(point)
on Linux X11. #46895 (Également en 35, 36) - Added support for menu item role
palette
andheader
on macOS. #47245 - Added support for node option
--experimental-network-inspection
. #47031 (Également en 35, 36) - Exposed
win.isContentProtected()
to allow developers to check window protection status. #47310 (Également en 36)
Changements majeurs avec rupture de compatibilité
Utility Process unhandled rejection behavior change
Utility Processes will now warn with an error message when an unhandled rejection occurs instead of crashing the process.
To restore the previous behavior, you can use:
process.on('unhandledRejection', () => {
process.exit(1);
});
Comportement modifié : process.exit()
termine l'utilitaire de façon synchronisée
Calling process.exit()
in a utility process will now kill the utility process synchronously.
This brings the behavior of process.exit()
in line with Node.js behavior.
Please refer to the
Node.js docs and
PR #45690 to understand the potential
implications of that, e.g., when calling console.log()
before process.exit()
.
Behavior Changed: WebUSB and WebSerial Blocklist Support
WebUSB and Web Serial now support the WebUSB Blocklist and Web Serial Blocklist used by Chromium and outlined in their respective specifications.
To disable these, users can pass disable-usb-blocklist
and disable-serial-blocklist
as command line flags.
Supprimé: valeur null
pour la propriété session
dans ProtocolResponse
This deprecated feature has been removed.
Previously, setting the ProtocolResponse.session
property to null
would create a random independent session. This is no longer supported.
Using single-purpose sessions here is discouraged due to overhead costs;
however, old code that needs to preserve this behavior can emulate it by
creating a random session with session.fromPartition(some_random_string)
and then using it in ProtocolResponse.session
.
Comportement modifié : BrowserWindow.IsVisibleOnAllWorkspaces()
sur Linux
BrowserWindow.IsVisibleOnAllWorkspaces()
will now return false on Linux if the
window is not currently visible.
Fin du support pour 34.x.y
Electron 34.x.y a atteint la limite pour le support conformément à la politique d'assistance 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.
E37 (Jun'25) | E38 (Aug'25) | E39 (Oct'25) |
---|---|---|
37.x.y | 38.x.y | 39.x.y |
36.x.y | 37.x.y | 38.x.y |
35.x.y | 36.x.y | 37.x.y |
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.