Skip to main content

Electron 15.0.0

· 7 min read

Electron 15.0.0 已经发布!它包括对 Chromium 94、V8 9.4 和 Node.js 16.5.0 的升级。我们还在 window.open 上添加了 API 更新,修复了 bug,并进行了整体改进。详情请阅读下文!

🌐 Electron 15.0.0 has been released! It includes upgrades to Chromium 94, V8 9.4, and Node.js 16.5.0. We've added API updates to window.open, bug fixes, and general improvements. Read below for more details!


Electron 团队很高兴宣布发布 Electron 15.0.0!你可以通过 npm 使用 npm install electron@latest 安装,或者从我们的 发布网站 下载。继续阅读以了解此版本的详细信息,并请分享你的任何反馈意见!

🌐 The Electron team is excited to announce the release of Electron 15.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 and please share any feedback you have!

Electron 发布节奏变更

🌐 Electron Release Cadence Change

从 Electron 15 开始,Electron 将每 8 周发布一个新的主要稳定版本。你可以在这里阅读完整详情。

🌐 Starting with Electron 15, Electron will release a new major stable version every 8 weeks. You can read the full details here.

此外,Electron 将把支持的版本从最新的三个版本更改为最新的四个版本,直到 2022 年 5 月。查看我们的版本文档以获取有关 Electron 版本控制的更多详细信息。

🌐 Additionally, Electron will be changing supported versions from latest three versions to latest four versions until May 2022. See our versioning documentfor more detailed information about versioning in Electron.

显著变化

🌐 Notable Changes

  • nativeWindowOpen: true 不再是实验性的,现在已成为默认设置。
  • 添加了 safeStorage 字符串加密 API。#30430
  • WebContents 中添加了 'frame-created' 事件,该事件在页面中创建框架时触发。 #30801
  • 已将调整大小的 edge 信息添加到 BrowserWindowwill-resize 事件中。 #29199

请查看 15.0.0 版本说明 以获取新功能和更改的完整列表。

🌐 See the 15.0.0 release notes for a full list of new features and changes.

技术栈变更

🌐 Stack Changes

重大变化

🌐 Breaking Changes

以下是 Electron 15 引入的重大变更。关于这些以及未来变更的更多信息,可以在 计划中的重大变更 页面找到。

🌐 Below are breaking changes introduced in Electron 15. More information about these and future changes can be found on the Planned Breaking Changes page.

默认已更改:nativeWindowOpen 默认为 true

🌐 Default Changed: nativeWindowOpen defaults to true

在 Electron 15 之前,window.open 默认被修改为使用 BrowserWindowProxy。这意味着 window.open('about:blank') 无法用来同步打开可脚本化的子窗口,以及其他一些不兼容的问题。nativeWindowOpen: true 不再是实验性的,现在已成为默认设置。

🌐 Prior to Electron 15, window.open was by default shimmed to use BrowserWindowProxy. This meant that window.open('about:blank') did not work to open synchronously scriptable child windows, among other incompatibilities. nativeWindowOpen: true is no longer experimental, and is now the default.

有关更多详细信息,请参阅 Electron 中的 window.open 文档。

🌐 See the documentation for window.open in Electron for more details.

API 变更

🌐 API Changes

  • WebContents 中添加了 'frame-created' 事件,该事件在页面中创建框架时触发。 #30801
  • 添加了 safeStorage 字符串加密 API。#30430
  • dialog.showMessageBox 中添加了 signal 选项。 #26102
  • 为你的应用加载的 app.asar 文件添加了 Electron Fuse 以强制执行代码签名。需要最新的 asar 模块(v3.1.0 或更高版本)。#30900
  • 在打包应用中添加了熔丝以禁用 NODE_OPTIONS--inspect 调试参数。#30420
  • 新增 MenuItem.userAccelerator 属性以读取用户分配的 macOS 加速器覆盖。 #26682
  • 添加了新的 app.runningUnderARM64Translation 属性,用于检测在 Apple Silicon 上通过 Rosetta 运行,或在 ARM Windows 上通过 WOW 运行。#29168
  • 添加了新的 imageAnimationPolicy 网络偏好设置,以控制图片的动画效果。#29095
  • 已添加通过上下文桥发送 Blob 的支持。 #29247

移除/弃用的变更

🌐 Removed/Deprecated Changes

未删除或弃用任何 API。

🌐 No APIs have been removed or deprecated.

支持的版本

🌐 Supported Versions

从 Electron 15 开始,我们将把支持的版本从最新三个版本改为最新四个版本,直到 2022 年 5 月的 Electron 19。在 Electron 19 之后,我们将恢复支持最新三个版本。此版本支持更改是我们新节奏调整的一部分。请参阅我们的博客文章以获取完整详情

🌐 Starting in Electron 15, we will change supported versions from latest three versions to latest four versions until May 2022 with Electron 19. After Electron 19, we will return to supporting the latest three versions. This version support change is part of our new cadence change. Please see our blog post for full details here.

建议开发者和应用升级到较新版本的 Electron。

🌐 Developers and applications are encouraged to upgrade to a newer version of Electron.

E15(2021年9月)E16(2021年11月)E17(2022年2月)E18(2022年3月)E19(2022年5月)
15.x.y16.x.y17.x.y18.x.y19.x.y
14.x.y15.x.y16.x.y17.x.y18.x.y
13.x.y14.x.y15.x.y16.x.y17.x.y
12.x.y13.x.y14.x.y15.x.y--

下一步计划

🌐 What's Next

在短期内,你可以预期团队将继续专注于跟进构成 Electron 的主要组件的发展,包括 Chromium、Node 和 V8。虽然我们谨慎地不对发布时间作出承诺,但我们的计划是大约每季度发布一次包含这些组件新版本的 Electron 重大版本。

🌐 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. Although we are careful not to make promises about release dates, our plan is release new major versions of Electron with new versions of those components approximately quarterly.

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

🌐 You can find Electron's public timeline here.

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

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