Electron 35.0.0
Electron 35.0.0 wurde veröffentlicht! It includes upgrades to Chromium 134.0.6998.44, V8 13.5, and Node 22.14.0.
Das Electron-Team freut sich, die Veröffentlichung von Electron 35.0.0 ankündigen zu können! Sie können es mit npm über npm electron@latest installieren oder von unserer Releases-Website herunterladen. Lesen Sie weiter für Details zu dieser Version.
If you have any feedback, please share it with us on Bluesky or Mastodon, or join our community Discord! Bugs und Feature-Anfragen können im Issue-Tracker von Electron gemeldet werden.
Bemerkenswerte Änderungen
Service Worker Preload Scripts for Improved Extensions Support
Originally proposed in RFC #8 by @samuelmaddock, Electron 35 adds the ability to attach a preload script to Service Workers. With Chrome's Manifest V3 Extensions routing a lot of work through extension service workers, this feature fills in a gap in Electron's support for modern Chrome extensions.
When registering a preload script programmatically at the Session level, you can now specifically apply it to Service Worker contexts with the ses.registerPreloadScript(script) API.
// Add our preload realm script to the session.
session.defaultSession.registerPreloadScript({
// Our script should only run in service worker preload realms.
type: 'service-worker',
// The absolute path to the script.
script: path.join(__dirname, 'extension-sw-preload.js'),
});
Furthermore, IPC is now available between Service Workers and their attached preload scripts via the ServiceWorkerMain.ipc class. The preload script will still use the ipcRenderer module to communicate with its Service Worker. See the original RFC for more details.
This feature was preceded by many other changes that laid the groundwork for it:
- #45329 redesigned the Session module's preload APIs to support registering and unregistering individual preload scripts.
- #45229 added the experimental
contextBridge.executeInMainWorld(executionScript)script to evaluate JavaScript in the main world over the context bridge. - #45341 added the
ServiceWorkerMainclass to interact with Service Workers in the main process.



