Electron 26.0.0
Electron 26.0.0 已经发布!它包括对 Chromium 116.0.5845.62、V8 11.2 和 Node.js 18.16.1 的升级。请往下阅读了解更多详情!
🌐 Electron 26.0.0 has been released! It includes upgrades to Chromium 116.0.5845.62, V8 11.2, and Node.js 18.16.1. Read below for more details!
Electron 团队很高兴地宣布发布 Electron 26.0.0!你可以通过 npm 使用 npm install electron@latest 安装,或从我们的发布网站下载。请继续阅读以了解此次发布的详细信息。
🌐 The Electron team is excited to announce the release of Electron 26.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.
技术栈变更
🌐 Stack Changes
- Chromium
116.0.5845.62 - Node.js
18.16.1 - V8
11.2
重大变化
🌐 Breaking Changes
已弃用:webContents.getPrinters
🌐 Deprecated: webContents.getPrinters
webContents.getPrinters 方法已被弃用。请改用 webContents.getPrintersAsync。
🌐 The webContents.getPrinters method has been deprecated. Use
webContents.getPrintersAsync instead.
const w = new BrowserWindow({ show: false });
// Deprecated
console.log(w.webContents.getPrinters());
// Replace with
w.webContents.getPrintersAsync().then((printers) => {
console.log(printers);
});
已弃用:systemPreferences.{get,set}AppLevelAppearance 和 systemPreferences.appLevelAppearance
🌐 Deprecated: systemPreferences.{get,set}AppLevelAppearance and systemPreferences.appLevelAppearance
systemPreferences.getAppLevelAppearance 和 systemPreferences.setAppLevelAppearance 方法已被弃用,systemPreferences.appLevelAppearance 属性也不再使用。请改用 nativeTheme 模块。
🌐 The systemPreferences.getAppLevelAppearance and systemPreferences.setAppLevelAppearance
methods have been deprecated, as well as the systemPreferences.appLevelAppearance property.
Use the nativeTheme module instead.
// Deprecated
systemPreferences.getAppLevelAppearance();
// Replace with
nativeTheme.shouldUseDarkColors;
// Deprecated
systemPreferences.appLevelAppearance;
// Replace with
nativeTheme.shouldUseDarkColors;
// Deprecated
systemPreferences.setAppLevelAppearance('dark');
// Replace with
nativeTheme.themeSource = 'dark';
已弃用:systemPreferences.getColor 的 alternate-selected-control-text 值
🌐 Deprecated: alternate-selected-control-text value for systemPreferences.getColor
systemPreferences.getColor 的 alternate-selected-control-text 值已被弃用。请改用 selected-content-background。
🌐 The alternate-selected-control-text value for systemPreferences.getColor
has been deprecated. Use selected-content-background instead.
// Deprecated
systemPreferences.getColor('alternate-selected-control-text');
// Replace with
systemPreferences.getColor('selected-content-background');
新功能
🌐 New Features
- 已添加
safeStorage.setUsePlainTextEncryption和safeStorage.getSelectedStorageBackendAPI。 #39107 - 已添加
safeStorage.setUsePlainTextEncryption和safeStorage.getSelectedStorageBackendAPI。 #39155 - 已将
senderIsMainFrame添加到通过ipcRenderer.sendTo()发送的消息中。 #39206 - 已增加支持将菜单标记为键盘启动。 #38954
23.x.y 支持终止
🌐 End of Support for 23.x.y
根据项目的支持政策,Electron 23.x.y 已结束支持。我们鼓励开发者和应用升级到更新版本的 Electron。
🌐 Electron 23.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.
| E26(2023年8月) | E27(2023年10月) | E28(2024年1月) |
|---|---|---|
| 26.x.y | 27.x.y | 28.x.y |
| 25.x.y | 26.x.y | 27.x.y |
| 24.x.y | 25.x.y | 26.x.y |
| 22.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.