Skip to main content

Electron 23.0.0

· 6 min read

Electron 23.0.0 已发布!它包括对 Chromium 110、V8 11.0 和 Node.js 18.12.1 的升级。此外,不再支持 Windows 7/8/8.1。请阅读以下内容了解更多详情!

🌐 Electron 23.0.0 has been released! It includes upgrades to Chromium 110, V8 11.0, and Node.js 18.12.1. Additionally, support for Windows 7/8/8.1 has been dropped. Read below for more details!


Electron 团队很高兴地宣布发布 Electron 23.0.0!你可以通过 npm 使用 npm install electron@latest 安装,或从我们的发布网站下载。请继续阅读以了解此次发布的详细信息。

🌐 The Electron team is excited to announce the release of Electron 23.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. Continue reading for details about this release.

如果你有任何反馈,请通过 Twitter 与我们分享,或加入我们的社区 Discord!你可以在 Electron 的 问题追踪器 中报告错误和功能请求。

🌐 If you have any feedback, please share it with us on Twitter, or join our community Discord! Bugs and feature requests can be reported in Electron's issue tracker.

放弃对 Windows 7/8/8.1 的支持

🌐 Dropping Windows 7/8/8.1 Support

Electron 23 不再支持 Windows 7/8/8.1。Electron 遵循 Chromium 的计划弃用政策,该政策将在 Chromium 109 中弃用对 Windows 7/8/8.1 以及 Windows Server 2012 和 2012 R2 的支持(点击此处了解更多信息)(https://support.google.com/chrome/thread/185534985/sunsetting-support-for-windows-7-8-8-1-in-early-2023?hl=en)。

🌐 Electron 23 no longer supports Windows 7/8/8.1. Electron follows the planned Chromium deprecation policy, which will deprecate Windows 7/8/8.1 , as well as Windows Server 2012 and 2012 R2 support in Chromium 109 (read more here).

技术栈变更

🌐 Stack Changes

新功能

🌐 New Features

  • 已向 Display 对象添加 label 属性。#36933
  • 新增了一个 app.getPreferredSystemLanguages() API 用于返回用户的系统语言。 #36035
  • 已增加对 WebUSB API 的支持。#36289
  • 新增对 SerialPort.forget() 的支持,以及在当某个来源被撤销时,在 Session 对象上触发的新事件 serial-port-revoked#35310
  • 新增 win.setHiddenInMissionControl API,允许开发者在 macOS 上选择不使用任务控制。 #36092

API 重大变更

🌐 Breaking API Changes

以下是 Electron 23 引入的重大变更。你可以在 计划中的重大变更 页面上阅读有关这些变更和未来变更的更多信息。

🌐 Below are breaking changes introduced in Electron 23. You can read more about these changes and future changes on the Planned Breaking Changes page.

已移除:BrowserWindow scroll-touch-* 事件

🌐 Removed: BrowserWindow scroll-touch-* events

BrowserWindow 上已移除不推荐使用的 scroll-touch-beginscroll-touch-endscroll-touch-edge 事件。请改用 WebContents 上新提供的 input-event 事件。

🌐 The deprecated scroll-touch-begin, scroll-touch-end and scroll-touch-edge events on BrowserWindow have been removed. Instead, use the newly available input-event event on WebContents.

// Removed in Electron 23.0
-win.on('scroll-touch-begin', scrollTouchBegin)
-win.on('scroll-touch-edge', scrollTouchEdge)
-win.on('scroll-touch-end', scrollTouchEnd)

// Replace with
+win.webContents.on('input-event', (_, event) => {
+ if (event.type === 'gestureScrollBegin') {
+ scrollTouchBegin()
+ } else if (event.type === 'gestureScrollUpdate') +{
+ scrollTouchEdge()
+ } else if (event.type === 'gestureScrollEnd') {
+ scrollTouchEnd()
+ }
+})

20.x.y 支持终止

🌐 End of Support for 20.x.y

根据项目的支持政策,Electron 20.x.y 已达到支持结束期。建议开发者和应用升级到更新版本的 Electron。

🌐 Electron 20.x.y has reached end-of-support as per the project's support policy. Developers and applications are encouraged to upgrade to a newer version of Electron.

E22(2022年11月)E23(2023年2月)E24(2023年4月)E25(2023年5月)E26(2023年8月)
22.x.y23.x.y24.x.y25.x.y26.x.y
21.x.y22.x.y23.x.y24.x.y25.x.y
20.x.y21.x.y22.x.y23.x.y24.x.y

下一步计划

🌐 What's Next

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

🌐 In the short term, you can expect the team to continue to focus on keeping up with the development of the major components that make up Electron, including Chromium, Node, and V8.

你可以在这里找到 Electron 的公开时间线

🌐 You can find Electron's public timeline here.

有关未来更改的更多信息可以在计划中的重大变更页面上找到。

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