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
ipcRenderer.invoke()
andipcMain.handle()
for asynchronous request/response-style IPC. These are strongly recommended over theremote
module. See this "Electron’s ‘remote’ module considered harmful" blog post for more information. #18449Added
nativeTheme
API to read and respond to changes in the OS's theme and color scheme. #19758, #20486Switched 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). #18981app.enableMixedSandbox()
#17894app.getApplicationMenu()
,app.setApplicationMenu()
,powerMonitor.querySystemIdleState()
,powerMonitor.querySystemIdleTime()
,webFrame.setIsolatedWorldContentSecurityPolicy()
,webFrame.setIsolatedWorldHumanReadableName()
,webFrame.setIsolatedWorldSecurityOrigin()
#18159
Session.clearAuthCache()
no longer allows filtering the cleared cache entries. #17970Native 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. #18413The
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 aPromise
. #18792Added
always-on-top-changed
event emission for macOS. #19462Added
app.resignCurrentActivity()
to allows marking inactive the current Handoff user activity without invalidating it. #18659Added
captureMode
andmaxFileSize
options to the netLog API. #19215Added
creationTime
/sandboxed
/integrityLevel
toapp.getAppMetrics()
output. #18718Added
failureReason
parameter to thewebContents.print()
callback function to distinguish between success, failure, and cancellation. #19000Added
getBounds()
method for BrowserView. #19370Added
gpu-info-update
event toapp
, which is emitted whenever there is a GPU info update. #18250Added
memory
toapp.getAppMetrics()
. #18831Added
process.getBlinkMemoryInfo()
. #17762Added
removeInsertedCSS()
towebFrame
/webContents
/<webview>
. #16579Added
zoom-changed
event towebContents
, which is emitted when the user zooms using the mouse wheel on Windows, even if the focus is inside an (x-origin) iframe. #17747Migrated
Tray
from custom to native view to be compatible with Catalina (macOS). #18981Added a
MenuItem.toolTip
property macOS. #19099Added printing customization options. #18984
Added an optional conflict handling callback to
app.moveToApplicationsFolder
. #18916Added missing support for
ELECTRON_DEFAULT_ERROR_MODE
in the GPU process. #17728Added security warning for remote modules with remote content. #18822
Support CSS
origin
inwebFrame.insertCSS()
. #19268Support HTTP preconnect resource hints. #19952
Support NSVisualEffectMaterials vibrancy types added in macOS Mojave. #19073
Support
mouse-move
event of Tray API on Windows. #19265Support
systemPreferences.isDarkMode()
API on Windows. #19217Support
systemPreferences.isHighContrastColorScheme()
API on macOS. #19331Support picture-in-picture mode for video elements. #19914
Support rotation multi-touch gestures on
BrowserWindow
for macOS. #19294Added 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
enablesnodeIntegrationInSubFrames
. #18650Set the
ELECTRON_SKIP_BINARY_DOWNLOAD=1
environment variable to skip electron binary download. #17627Deprecated
netLog.currentlyLoggingPath
. #18289Added Windows on Arm node header files to checksum file. #20261
Properties
Converted
webContents
primitive getters and setters to actual properties. #18998Converted
badgeCount
to an actual property on theapp
module. #17363app.name
is now a property. #17701nativeImage.templateImage
is now a property on thenativeImage
prototype. #18124Converted
appLevelAppearance
to be a property onsystemPreferences
. #18477Converted
autoHideMenuBar
to a property onBrowserWindow
instances. #18555Converted
savePath
accessor to a property on DownloadItem instances. #18677Converted
closable
,fullscreenable
,maximizable
,minimizable
,movable
, andresizable
to be properties on theBrowserWindow
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
#19403Fixed Linux console warning about gtk_disable_setlocale(). #20012
Fixed
triggeredByAccelerator
Event property behavior forMenuItems
. #18865Fixed a crash in
window.print()
. #19728Fixed a crash on manual print cancellation as well as an issue with
deviceName
not working. #19668Fixed 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. #19014Fixed crashReporter
addExtraParameter
/removeExtraParameter
methodsundefined
in macOS node child processes. #15790Fixed desktopCapturer leak. #20280
Fixed setting
src
on<webview>
being too slow. #18990Fixed several cases where
document.visibilityState
would be incorrect. Thewin.show()
andwin.hide()
methods now correctly update visibility state. #20134Fixed support for the
webkitdirectory
attribute oninput[type=file]
elements. #18343Fixed windows debug logging. #18199
Node.JS globals (
process
,Buffer
, etc.) are no longer removed from the global scope if you havecontextIsolation
enabled as it is safe for those variables to still exist in their isolated world. #18967Non-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. #19514web-contents-created
andbrowser-window-created
no longer emit an empty object in place of Event. #19465Fixed an issue where
netLog.startLogging()
would silently fail when called immediately duringapp.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.