Electron Releases - v7.0.0

npm install electron@v7.0.0
yarn add electron@v7.0.0

Release Notes

Notable Changes

  • Stack upgrades:
Stack Version in Electron 6 Version in Electron 7 What's New
Chromium 76.0.3809.146 78.0.3905.1 77, 78
V8 7.6 7.8 7.7, 7.8
Node.js 12.4.0 12.8.1 12.5, 12.6, 12.7, 12.8, 12.8.1
  • Added Windows on Arm (64 bit) release. #18591, #20112
  • Added ipcRenderer.invoke() and ipcMain.handle() for asynchronous request/response-style IPC. These are strongly recommended over the remote module. See this "Electron’s ‘remote’ module considered harmful" blog post for more information. #18449
  • Added nativeTheme API to read and respond to changes in the OS's theme and color scheme. #19758, #20486
  • Switched to a new TypeScript Definitions generator, which generates more precise definitions. If your TypeScript build fails, this is the likely cause. #18103

Breaking Changes

More information about these and future changes can be found on project's Planned Breaking Changes page.

  • Removed deprecated APIs:
    • Callback-based versions of functions that now use Promises. #17907
    • Tray.setHighlightMode() (macOS). #18981
    • app.enableMixedSandbox() #17894
    • app.getApplicationMenu(),
    • app.setApplicationMenu(),
    • powerMonitor.querySystemIdleState(),
    • powerMonitor.querySystemIdleTime(),
    • webFrame.setIsolatedWorldContentSecurityPolicy(),
    • webFrame.setIsolatedWorldHumanReadableName(),
    • webFrame.setIsolatedWorldSecurityOrigin() #18159
  • Session.clearAuthCache() no longer allows filtering the cleared cache entries. #17970
  • Native interfaces on macOS (menus, dialogs, etc.) now automatically match the dark mode setting on the user's machine. #19226
  • Updated the electron module to use @electron/get. The minimum supported node version is now Node 8. #18413
  • The electron.asar file no longer exists. Any packaging scripts that depend on its existence should be updated. #18577

New Features

  • netLog.startLogging() now returns a promise which resolves when the net log has started recording.
  • All async webContents / <webview> methods now return a Promise. #18792
  • Added always-on-top-changed event emission for macOS. #19462
  • Added app.resignCurrentActivity() to allows marking inactive the current Handoff user activity without invalidating it. #18659
  • Added captureMode and maxFileSize options to the netLog API. #19215
  • Added creationTime / sandboxed / integrityLevel to app.getAppMetrics() output. #18718
  • Added failureReason parameter to the webContents.print() callback function to distinguish between success, failure, and cancellation. #19000
  • Added getBounds() method for BrowserView. #19370
  • Added gpu-info-update event to app, which is emitted whenever there is a GPU info update. #18250
  • Added memory to app.getAppMetrics(). #18831
  • Added process.getBlinkMemoryInfo(). #17762
  • Added removeInsertedCSS() to webFrame / webContents / <webview>. #16579
  • Added zoom-changed event to webContents, which is emitted when the user zooms using the mouse wheel on Windows, even if the focus is inside an (x-origin) iframe. #17747
  • Migrated Tray from custom to native view to be compatible with Catalina (macOS). #18981
  • Added a MenuItem.toolTip property macOS. #19099
  • Added printing customization options. #18984
  • Added an optional conflict handling callback to app.moveToApplicationsFolder. #18916
  • Added missing support for ELECTRON_DEFAULT_ERROR_MODE in the GPU process. #17728
  • Added security warning for remote modules with remote content. #18822
  • Support CSS origin in webFrame.insertCSS(). #19268
  • Support HTTP preconnect resource hints. #19952
  • Support NSVisualEffectMaterials vibrancy types added in macOS Mojave. #19073
  • Support mouse-move event of Tray API on Windows. #19265
  • Support systemPreferences.isDarkMode() API on Windows. #19217
  • Support systemPreferences.isHighContrastColorScheme() API on macOS. #19331
  • Support picture-in-picture mode for video elements. #19914
  • Support rotation multi-touch gestures on BrowserWindow for macOS. #19294
  • Added the ability to set authors in the Linux implementation of the About panel. #18964
  • Calling contentTracing.stopTracing() with no arguments is now permitted and has the same behaviour as calling it with an empty string (tracing data will be written to a temporary file). #18411
  • Can set a window always on top but behind the taskbar on Windows. #18982
  • Enabled the W3C Reporting API. #18255
  • Exposed the value of NSNotification.object to subscribers of notifications in systemPreferences. #19110
  • Implemented BrowserWindow.setFocusable on macOS. #19033
  • Renderer processes hosting cross-origin frames are now sandboxed unless the parent BrowserWindow enables nodeIntegrationInSubFrames. #18650
  • Set the ELECTRON_SKIP_BINARY_DOWNLOAD=1 environment variable to skip electron binary download. #17627
  • Deprecated netLog.currentlyLoggingPath. #18289
  • Added Windows on Arm node header files to checksum file. #20261

Properties

  • Converted webContents primitive getters and setters to actual properties. #18998
  • Converted badgeCount to an actual property on the app module. #17363
  • app.name is now a property. #17701
  • nativeImage.templateImage is now a property on the nativeImage prototype. #18124
  • Converted appLevelAppearance to be a property on systemPreferences. #18477
  • Converted autoHideMenuBar to a property on BrowserWindow instances. #18555
  • Converted savePath accessor to a property on DownloadItem instances. #18677
  • Converted closable, fullscreenable, maximizable, minimizable, movable, and resizable to be properties on the BrowserWindow prototype. #18618

Fixes

  • "Node integration with remote content" and "loading insecure content" warning messages are suppressed for localhost connections. #18814
  • ELECTRON_RUN_AS_NODE now correctly parses both node options and v8 flags. E.g. --expose_gc #19403
  • Fixed Linux console warning about gtk_disable_setlocale(). #20012
  • Fixed triggeredByAccelerator Event property behavior for MenuItems. #18865
  • Fixed a crash in window.print(). #19728
  • Fixed a crash on manual print cancellation as well as an issue with deviceName not working. #19668
  • Fixed a crash on tray popup being called multiple times in a row. #18999
  • Fixed bug where the close event would not emit upon closing modal window on macOS. #19014
  • Fixed crashReporter addExtraParameter / removeExtraParameter methods undefined in macOS node child processes. #15790
  • Fixed desktopCapturer leak. #20280
  • Fixed setting src on <webview> being too slow. #18990
  • Fixed several cases where document.visibilityState would be incorrect. The win.show() and win.hide() methods now correctly update visibility state. #20134
  • Fixed support for the webkitdirectory attribute on input[type=file] elements. #18343
  • Fixed windows debug logging. #18199
  • Node.JS globals (process, Buffer, etc.) are no longer removed from the global scope if you have contextIsolation enabled as it is safe for those variables to still exist in their isolated world. #18967
  • Non-absolute session preload script paths are now ignored for sandboxed renderers. #19066
  • getPath('logs') now throws a more descriptive error if it fails to find the logs path. #19514
  • web-contents-created and browser-window-created no longer emit an empty object in place of Event. #19465
  • Fixed an issue where netLog.startLogging() would silently fail when called immediately during app.on('ready').
  • Fixed an issue whereby requiring some modules before the app ready event had side effects. #17496

Documentation

End of Support for 4.x.y

Electron 4.x.y has reached end-of-support as per the project's support policy. Developers and applications are encouraged to upgrade to a newer version of Electron.