After publicly sharing the release timeline for Electron 5.0 and beyond in February, On Tuesday Electron 5.0 was released, as per the plan, with new features, upgrades, and fixes. Electron ships with the latest version upgrades of core components Chromium, Node.js, and V8: Chromium 73.0.3683.119, Node.js 12.0.0, and V8 7.3.492.27. Electron 5.0 also includes improvements to Electron-specific APIs. With this release, Electron 2.0.x has reached end of life.
Major changes in Electron 5.0
- Packaged apps will now behave the same as the default app. A default application menu will be created (unless the app has one) and the window-all-closed event will be automatically handled. (unless the app handles the event)
- Mixed sandbox mode is now enabled by default. Renderers launched with sandbox: true will now be actually sandboxed, where previously they would only be sandboxed if mixed-sandbox mode was also enabled.
- The default values of nodeIntegration and webviewTag are now false to improve security.
- The SpellCheck API has been changed to provide asynchronous results.
- BrowserWindow now supports managing multiple BrowserViews within the same BrowserWindow.
- Electron 5 continues with Electron’s Promisification initiative. This initiative will convert callback-based functions in Electron to return Promises. During this transition period, both the callback and Promise-based versions of these functions will work correctly, and will both be documented. A total of 12 APIs were converted for Electron 5.0.
- Three functions were changed or added to systemPreferences to access macOS systems’ colors. These include systemPreferences.getAccentColor, systemPreferences.getColor, and systemPreferences.getSystemColor
- The function process.getProcessMemoryInfo has been added to get memory usage statistics about the current process.
- New remote events have been added to improve security in the remote API. Now, remote.getBuiltin, remote.getCurrentWindow, remote.getCurrentWebContents and
.getWebContents can be filtered.
Three APIs are newly deprecated in Electron 5.0.0 and planned for removal in 6.0.0. These include Mksnapshot binaries for arm and arm64, ServiceWorker APIs on WebContents, and Automatic modules with sandboxed webContents.