Electron 27.0.0
Electron 27.0.0 вышел! Он включает обновления Chromium 118.0.5993.32
, V8 11.8
и Node.js 18.17.1
.
Команда Electron рада объявить о выпуске Electron 27.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.
If you have any feedback, please share it with us on Twitter or Mastodon, or join our community Discord! Bugs and feature requests can be reported in Electron's issue tracker.
Notable Changes
Stack Changes
- Chromium
118.0.5993.32
- Node.js
18.17.1
- V8
11.8
Критические изменения
Removed: macOS 10.13 / 10.14 support
macOS 10.13 (High Sierra) and macOS 10.14 (Mojave) are no longer supported by Chromium.
Older versions of Electron will continue to run on these operating systems, but macOS 10.15 (Catalina) or later will be required to run Electron v27.0.0 and higher.
Устарело: ipcRenderer.sendTo()
The ipcRenderer.sendTo()
API has been deprecated. It should be replaced by setting up a MessageChannel
between the renderers.
The senderId
and senderIsMainFrame
properties of IpcRendererEvent
have been deprecated as well.
Removed: color scheme events in systemPreferences
The following systemPreferences
events have been removed:
inverted-color-scheme-changed
high-contrast-color-scheme-changed
Use the new updated
event on the nativeTheme
module instead.
// Removed
systemPreferences.on('inverted-color-scheme-changed', () => {
/* ... */
});
systemPreferences.on('high-contrast-color-scheme-changed', () => {
/* ... */
});
// Replace with
nativeTheme.on('updated', () => {
/* ... */
});
Удален: webContents.getPrinters
The webContents.getPrinters
method has been removed. Используйте вместо него webContents.getPrintersAsync
.
const w = new BrowserWindow({ show: false });
// Removed
console.log(w.webContents.getPrinters());
// Replace with
w.webContents.getPrintersAsync().then((printers) => {
console.log(printers);
});
Removed: systemPreferences.{get,set}AppLevelAppearance
and systemPreferences.appLevelAppearance
The systemPreferences.getAppLevelAppearance
and systemPreferences.setAppLevelAppearance
methods have been removed, as well as the systemPreferences.appLevelAppearance
property. Вместо этого используйте модуль nativeTheme
.
// Removed
systemPreferences.getAppLevelAppearance();
// Replace with
nativeTheme.shouldUseDarkColors;
// Removed
systemPreferences.appLevelAppearance;
// Replace with
nativeTheme.shouldUseDarkColors;
// Removed
systemPreferences.setAppLevelAppearance('dark');
// Replace with
nativeTheme.themeSource = 'dark';
Removed: alternate-selected-control-text
value for systemPreferences.getColor
The alternate-selected-control-text
value for systemPreferences.getColor
has been removed. Вместо него используйте selected-content-background
.
// Removed
systemPreferences.getColor('alternate-selected-control-text');
// Replace with
systemPreferences.getColor('selected-content-background');
New Features
- Added app accessibility transparency settings api #39631
- Added support for
chrome.scripting
extension APIs #39675 - Enabled
WaylandWindowDecorations
by default #39644
Окончание поддержки версии 24.x.y
Поддержка Electron 24.x.y подошла к концу в соответствии с политикой поддержки. Developers and applications are encouraged to upgrade to a newer version of Electron.
E27 (Oct'23) | E28 (Dec'23) | E29 (Feb'24) |
---|---|---|
27.x.y | 28.x.y | 29.x.y |
26.x.y | 27.x.y | 28.x.y |
25.x.y | 26.x.y | 27.x.y |