Zum Hauptteil springen

Electron 27.0.0

· Die Lesezeit beträgt 3 min

Electron 27.0.0 wurde veröffentlicht! Es enthält Upgrades auf Chromium 118.0.5993.32, V8 11.8 und Node.js 18.17.1.


Das Electron-Team freut sich über die Veröffentlichung von Electron 27.0.0! Sie können es mit npm über npm install electron@latest installieren oder von unserer Release-Website herunterladen. Lesen Sie weiter für Details zu dieser Version.

If you have any feedback, please share it with us on Twitter or Mastodon, or join our community Discord! Bugs und Feature-Requests können in Electrons Issue-Tracker gemeldet werden.

Bemerkenswerte Änderungen

Stack-Änderungen

Breaking Changes

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.

Veraltet: 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', () => {
/* ... */
});

Entfernt: webContents.getPrinters

The webContents.getPrinters method has been removed. Verwende stattdessen 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. Verwenden Sie stattdessen das nativeTheme Modul.

// 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. Verwenden Sie stattdessen selected-content-background.

// Removed
systemPreferences.getColor('alternate-selected-control-text');
// Replace with
systemPreferences.getColor('selected-content-background');

Neue Funktionen

  • Added app accessibility transparency settings api #39631
  • Added support for chrome.scripting extension APIs #39675
  • Enabled WaylandWindowDecorations by default #39644

Ende der Unterstützung für 24.x.y

Electron 24.x.y hat das Ende der Unterstützung gemäß der Unterstützungsrichtlinien des Projekts erreicht. Developers and applications are encouraged to upgrade to a newer version of Electron.

E27 (Okt'23)E28 (Dec'23)E29 (Feb'24)
27.x.y28.x.y29.x.y
26.x.y27.x.y28.x.y
25.x.y26.x.y27.x.y

End of Extended Support for 22.x.y

Earlier this year, the Electron team extended Electron 22's planned end of life date from May 30, 2023 to October 10, 2023, in order to match Chrome's extended support for Windows 7/8/8.1 (see Farewell, Windows 7/8/8.1 for more details).

Electron 22.x.y has reached end-of-support as per the project's support policy and this support extension. This will drop support back to the latest three stable major versions, and will end official support for Windows 7/8/8.1.

What's Next

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.

Sie finden die öffentliche Timeline von Electron hier.

Weitere Informationen über zukünftige Änderungen finden Sie auf der geplante Änderungen Seite.