Electron 26.0.0
Electron 26.0.0 已發布!它包含 Chromium 116.0.5845.62
、V8 11.2
和 Node.js 18.16.1
的升級。請閱讀以下詳細資訊!
Electron 團隊很高興宣布 Electron 26.0.0 的發布!您可以使用 npm 通過 npm install electron@latest
安裝它,或從我們的發行版本網站下載它。繼續閱讀以了解有關此版本的詳細資訊。
如果您有任何回饋意見,請在 Twitter 上與我們分享,或加入我們的社群 Discord!錯誤和功能要求可以在 Electron 的問題追蹤器中回報。
重要變更
堆疊變更
- Chromium
116.0.5845.62
- Node.js
18.16.1
- V8
11.2
重大變更
已棄用:webContents.getPrinters
webContents.getPrinters
方法已棄用。請改用 webContents.getPrintersAsync
。
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
systemPreferences.getAppLevelAppearance
和 systemPreferences.setAppLevelAppearance
方法已棄用,systemPreferences.appLevelAppearance
屬性也已棄用。請改用 nativeTheme
模組。
// 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
值
systemPreferences.getColor
的 alternate-selected-control-text
值已棄用。請改用 selected-content-background
。
// Deprecated
systemPreferences.getColor('alternate-selected-control-text');
// Replace with
systemPreferences.getColor('selected-content-background');
新功能
- 新增
safeStorage.setUsePlainTextEncryption
和safeStorage.getSelectedStorageBackend
API。#39107 - 新增
safeStorage.setUsePlainTextEncryption
和safeStorage.getSelectedStorageBackend
API。#39155 - 將
senderIsMainFrame
新增至透過ipcRenderer.sendTo()
發送的訊息。#39206 - 新增支援將選單標示為由鍵盤啟動。#38954
結束對 23.x.y 的支援
根據專案的支援政策,Electron 23.x.y 已達到支援終止。建議開發人員和應用程式升級到較新版本的 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 |
下一步
短期內,您可以期待團隊繼續專注於跟上構成 Electron 的主要元件(包括 Chromium、Node 和 V8)的開發。
您可以在此處找到Electron 的公開時間表。
有關未來變更的更多資訊,請參閱計畫的重大變更頁面。