跳转到主内容

Electron 38.0.0

· 阅读时间:约 4 分钟

Electron 38.0.0 已发布! 它包括对 Chromium 140.0.7339.41、V8 14.0 和 Node 22.16.0 的升级。


Electron 团队很高兴发布了 Electron 38.0.0 ! 你可以通过 npm install electron@latest 或者从我们的发布网站下载它。 继续阅读此版本的详细信息。

如果您有任何反馈,请在 BlueskyMastodon 上与我们分享,或加入我们的 Discord 社区! Bug 和功能请求可以在 Electron 的问题跟踪器中报告。

重要变化

架构(Stack)更新

Electron 38 将 Chromium 从 138.0.7204.35 升级到 140.0.7339.41, Node 从 22.16.0 升级到 22.18.0 以及 V8 从 13.8 升级到 14.0

New Features and Improvements

  • Added support for customizing system accent color and highlighting of active window border. #47285 (Also in 37)
  • Added fileBacked and purgeable fields to process.getSystemMemoryInfo() for macOS. #48146 (Also in 37)
  • Added tray.{get|set}AutosaveName to enable macOS tray icons to maintain position across launches. #48077 (Also in 37)
  • Added webFrameMain.fromFrameToken(processId, frameToken) to get a WebFrameMain instance from its frame token. #47942
  • Added support for app.getRecentDocuments() on Windows and macOS. #47924 (Also in 37)
  • Internally switched to using DIR_ASSETS instead of DIR_MODULE/DIR_EXE to locate assets and resources, and added "assets" as a key that can be queried via app.getPath. #47950 (Also in 37)
  • Fixed an issue where dialog.showMessageDialog showed a window incorrectly centered to monitor instead of parent window when passed. #48215
  • Fixed an issue where users on macOS were unable to interact with a webpage loaded via loadURL. #47575

重大更改

移除:macOS 11 支持

macOS 11 (Big Sur) is no longer supported by Chromium.

Older versions of Electron will continue to run on Big Sur, but macOS 12 (Monterey) or later will be required to run Electron v38.0.0 and higher.

Removed: ELECTRON_OZONE_PLATFORM_HINT environment variable

The default value of the --ozone-plaftform flag changed to auto.

You should use the XDG_SESSION_TYPE=wayland environment variable instead to use Wayland.

Removed: plugin-crashed event

The plugin-crashed event has been removed from webContents.

Deprecated: webFrame.routingId property

The routingId property will be removed from webFrame objects.

You should use webFrame.frameToken instead.

Deprecated: webFrame.findFrameByRoutingId(routingId)

The webFrame.findFrameByRoutingId(routingId) function will be removed.

You should use webFrame.findFrameByToken(frameToken) instead.

Google Summer of Code Concludes

Our two Google Summer of Code contributors have just completed their summer projects!

  • @nilayarya crafted 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 original RFC at electron/rfcs#16.
  • @hitarth-gg put a lot of hard work into modernizing the long-dormant Devtron extension using Chrome Manifest V3 APIs. This project provides tooling for developers to debug IPC communication, track event listeners, and visualize module dependencies in their Electron applications.

Stay tuned for a more detailed blog post outlining their projects and the outcomes.

终止对 35.x.y 的支持

根据项目的支持政策,Electron 35.x.y 已经达到了支持的终点。 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

E38 (Sep'25)E39 (Oct'25)E40 (Jan'26)
38.x.y39.x.y40.x.y
37.x.y38.x.y39.x.y
36.x.y37.x.y38.x.y

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。

您可以在此处找到 Electron 的公开时间表

有关这些和未来变化的更多信息可在计划的突破性变化页面找到。