Electron 31.0.0
Electron 31.0.0 已发布!它包含对 Chromium 126.0.6478.36、V8 12.6 和 Node 20.14.0 的升级。
🌐 Electron 31.0.0 has been released! It includes upgrades to Chromium 126.0.6478.36, V8 12.6, and Node 20.14.0.
Electron 团队很高兴地宣布发布 Electron 31.0.0!你可以通过 npm 使用 npm install electron@latest 安装,或从我们的发布网站下载。请继续阅读以了解此次发布的详细信息。
🌐 The Electron team is excited to announce the release of Electron 31.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 或 Mastodon 与我们分享,或者加入我们的社区 Discord!错误和功能请求可以在 Electron 的 问题追踪器 中报告。
🌐 If you have any feedback, please share it with us on Twitter or Mastodon, or join our community Discord! Bugs and feature requests can be reported in Electron's issue tracker.
显著变化
🌐 Notable Changes
- 扩展
WebContentsView以接受预先存在的webContents对象。 #42319 - 新增对
NODE_EXTRA_CA_CERTS的支持。#41689 - 已更新 window.flashFrame(bool) 以在 macOS 上持续闪烁。 #41391
- 已移除
WebSQL支持 #41868 nativeImage.toDataURL将保留 PNG 颜色空间 #41610- 扩展
webContents.setWindowOpenHandler以支持手动创建 BrowserWindow。#41432
技术栈变更
🌐 Stack Changes
- Chromium
126.0.6478.36 - 节点
20.14.0 - V8
12.6
Electron 31 将 Chromium 从 124.0.6367.49 升级到 126.0.6478.36,Node 从 20.11.1 升级到 20.14.0,V8 从 12.4 升级到 12.6。
🌐 Electron 31 upgrades Chromium from 124.0.6367.49 to 126.0.6478.36, Node from 20.11.1 to 20.14.0, and V8 from 12.4 to 12.6.
新功能
🌐 New Features
- 在
Session中添加了clearData方法。 #40983- 在
Session.clearDataAPI 中添加了 options 参数。 #41355
- 在
- 在
navigator.serial中添加了对通过服务类 ID 请求的蓝牙端口的支持。 #41638 - 添加了对 Node
NODE_EXTRA_CA_CERTS环境变量的支持。 #41689 - 扩展
webContents.setWindowOpenHandler以支持手动创建 BrowserWindow。#41432 - 已实现对网页标准 文件系统 API 的支持。#41419
- 扩展
WebContentsView以接受预先存在的WebContents实例。 #42319 - 在 webContents API 上添加了一个新的实例属性
navigationHistory,并提供navigationHistory.getEntryAtIndex方法,使应用能够获取浏览历史中任意导航条目的 URL 和标题。#41577 (也在 29、30 中)
重大变化
🌐 Breaking Changes
已移除:WebSQL 支持
🌐 Removed: WebSQL support
Chromium 已经在上游移除了对 WebSQL 的支持,将其转为仅在 Android 上使用。有关更多信息,请参阅 Chromium 关于移除的讨论意图。
🌐 Chromium has removed support for WebSQL upstream, transitioning it to Android only. See Chromium's intent to remove discussion for more information.
行为已更改:nativeImage.toDataURL 将保留 PNG 颜色空间
🌐 Behavior Changed: nativeImage.toDataURL will preseve PNG colorspace
PNG 解码器的实现已更改以保留颜色空间数据。此函数返回的编码数据现在与之匹配。
🌐 PNG decoder implementation has been changed to preserve colorspace data. The encoded data returned from this function now matches it.
有关更多信息,请参见 crbug.com/332584706。
🌐 See crbug.com/332584706 for more information.
行为变化:win.flashFrame(bool) 在 macOS 上会持续闪烁 Dock 图标
🌐 Behavior Changed: win.flashFrame(bool) will flash dock icon continuously on macOS
这使得行为与 Windows 和 Linux 保持一致。之前的行为:第一个 flashFrame(true) 只会让 Dock 图标弹跳一次(使用 NSInformationalRequest 级别),而 flashFrame(false) 则没有任何作用。新的行为:持续闪烁直到调用 flashFrame(false) 为止。这改为使用 NSCriticalRequest 级别。要明确使用 NSInformationalRequest 以使 Dock 图标单次弹跳,仍然可以使用 dock.bounce('informational') 。
🌐 This brings the behavior to parity with Windows and Linux. Prior behavior: The first flashFrame(true) bounces the dock icon only once (using the NSInformationalRequest level) and flashFrame(false) does nothing. New behavior: Flash continuously until flashFrame(false) is called. This uses the NSCriticalRequest level instead. To explicitly use NSInformationalRequest to cause a single dock icon bounce, it is still possible to use dock.bounce('informational').
28.x.y 支持终止
🌐 End of Support for 28.x.y
根据项目的支持政策,Electron 28.x.y 已达到支持结束。建议开发者和应用升级到更新版本的 Electron。
🌐 Electron 28.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.
| E31(2024年6月) | E32(2024年8月) | E33(2024年10月) |
|---|---|---|
| 31.x.y | 32.x.y | 33.x.y |
| 30.x.y | 31.x.y | 32.x.y |
| 28.x.y | 29.x.y | 31.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.