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 install electron@latest
使用 npm 安装它,也可以从我们的 发布网站。继续阅读以了解有关此版本的详细信息。
¥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.
显著变化
¥Notable Changes
技术栈变更
¥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.getSelectedStorageBackend
API。#39107¥Added
safeStorage.setUsePlainTextEncryption
andsafeStorage.getSelectedStorageBackend
api. #39107 -
添加了
safeStorage.setUsePlainTextEncryption
和safeStorage.getSelectedStorageBackend
API。#39155¥Added
safeStorage.setUsePlainTextEncryption
andsafeStorage.getSelectedStorageBackend
api. #39155 -
将
senderIsMainFrame
添加到通过ipcRenderer.sendTo()
发送的消息中。#39206¥Added
senderIsMainFrame
to messages sent viaipcRenderer.sendTo()
. #39206 -
添加了将菜单标记为键盘启动的支持。#38954
¥Added support for flagging a Menu as being keyboard initiated. #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.