Electron 13.0.0
Electron 13.0.0 已经发布!它包括对 Chromium 91 和 V8 9.1 的升级。我们新增了几个 API 更新、修复了多处错误,并进行了整体改进。详情请阅读下面内容!
🌐 Electron 13.0.0 has been released! It includes upgrades to Chromium 91 and V8 9.1. We've added several API updates, bug fixes, and general improvements. Read below for more details!
Electron 团队很高兴宣布发布 Electron 13.0.0!你可以通过 npm 使用 npm install electron@latest 安装,或者从我们的发布网站下载。继续阅读以了解此次发布的详细信息,并请分享你的任何反馈!
🌐 The Electron team is excited to announce the release of Electron 13.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!
显著变化
🌐 Notable Changes
- 新增
process.contextIsolated属性,用于指示当前渲染器上下文是否启用了contextIsolation。#28252 - 新增
session.storagePathAPI,用于获取会话特定数据在磁盘上的路径。#28866 - 已弃用
WebContents的new-window事件。它已被webContents.setWindowOpenHandler()取代 - 添加了
process.contextId,由@electron/remote使用。 #28251
请查看 13.0.0 发布说明 以获取新功能和更改的完整列表。
🌐 See the 13.0.0 release notes for a full list of new features and changes.
技术栈变更
🌐 Stack Changes
- Chromium
91 - Node.js
14.16.0 - V8
9.1
重大变化
🌐 Breaking Changes
window.open()参数 frameName 不再被设置为窗口标题。 #27481- 已修改
session.setPermissionCheckHandler(handler)以允许handler的第一个参数webContents为null。#19903
有关这些和未来更改的更多信息,请参阅计划中的重大更改页面。
🌐 More information about these and future changes can be found on the Planned Breaking Changes page.
API 变更
🌐 API Changes
- 为
BrowserWindow添加了roundedCorners选项。 #27572 - 新增了
session.storagePathAPI,用于获取会话特定数据在磁盘上的路径。28866 - 新增对通过上下文桥传递 DOM 元素的支持。 #26776
- 已将
process.uptime()添加到沙箱渲染器中。 #26684 - 已向作为
context-menu事件一部分发出的参数中添加缺失字段。#26788 - 添加了对注册 Manifest V3 扩展服务工作线程的支持。
- 已向 ServiceWorkers 添加 ‘registration-completed’ 事件。 #27562
移除/弃用的变更
🌐 Removed/Deprecated Changes
以下 API 已被删除或弃用:
🌐 The following APIs have been removed or are now deprecated:
-
已弃用
WebContents的new-window事件。它已被webContents.setWindowOpenHandler()取代 -
已移除弃用的
shell.moveItemToTrash()。#26723 -
已移除以下不推荐使用的
BrowserWindow扩展 API:BrowserWindow.addExtension(path)BrowserWindow.addDevToolsExtension(path)BrowserWindow.removeExtension(name)BrowserWindow.removeDevToolsExtension(name)BrowserWindow.getExtensions()BrowserWindow.getDevToolsExtensions()
请改用
sessionAPI:ses.loadExtension(path)ses.removeExtension(extension_id)ses.getAllExtensions()
-
以下
systemPreferences方法已被弃用:systemPreferences.isDarkMode()systemPreferences.isInvertedColorScheme()systemPreferences.isHighContrastColorScheme()
请改用以下
nativeTheme属性:nativeTheme.shouldUseDarkColorsnativeTheme.shouldUseInvertedColorSchemenativeTheme.shouldUseHighContrastColors
10.x.y 终止支持
🌐 End of Support for 10.x.y
根据项目的支持政策,Electron 10.x.y 已达到支持终止。建议开发者和应用升级到更新版本的 Electron。
🌐 Electron 10.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.
下一步计划
🌐 What's Next
在短期内,你可以预期团队将继续专注于跟上构成 Electron 的主要组件(包括 Chromium、Node 和 V8)的开发。虽然我们谨慎地不对发布日期做出承诺,但我们的计划是大约每季度发布一次包含这些组件新版本的 Electron 主要版本。初步的 14.0.0 计划 列出了 Electron 14.0 开发生命周期中的关键日期。此外,请参阅我们的版本控制文档 以获取关于 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. The tentative 14.0.0 schedule maps out key dates in the Electron 14.0 development life cycle. Also, see our versioning document for more detailed information about versioning in Electron.
有关即将发布的 Electron 版本中计划的重大更改的信息,请参阅我们的计划中的重大更改文档。
🌐 For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.