npm install electron@v5.0.0
yarn add electron@v5.0.0
Release Notes
Breaking Changes
- Upgraded to Chromium
73.0.3683.119
, Node.js12.0.0
, and V87.3.492.27
. - The default values of
nodeIntegration
andwebviewTag
are nowfalse
to improve security. #16235 - Removed support for deprecated construction of a TouchBar with an array of items, use an options object instead. #15650
- Enabled mixed-sandbox mode by default.
enableMixedSandbox
and the--enable-mixed-sandbox
command-line switch still exist for compatibility, but are deprecated and have no effect. #15894
Features
- Added `ELECTRON_DISABLE_SANDBOX environment variable to make it easier to disable sandboxing in Docker-based Linux CI environments. #16662
- Added Promise support for the Cookies API. #16702
- Added
activate
option towebContents.openDevTools
. #13852 - Added
app.commandLine.hasSwitch()
/app.commandLine.getSwitchValue()
. #16282 - Added
fileMenu
/viewMenu
/appMenu
roles. #16328 - Added
ipc-message
andipc-message-sync
events towebContents
. #16468 - Added
preload-error
event towebContents
emitted when preload script fails (parse error, unhandled exception, etc.). #16411 - Added
win.removeMenu()
to remove application menus instead of usingwin.setMenu(null)
. #16657 - Added a way to query for system colors on MacOS via
systemPreferences.getSystemColor()
. #16248 - Added about panel customization on linux. #15658
- Added caps lock and numlock as keyboard accelerator modifiers. #16725
- Added event and method to detect high contrast color schemes . #15493
- Added getMemoryFootprint API. #14847
- Added macOS support for
systemPreferences.getAccentColor()
. #16251 - Added macOS support to
systemPreferences.getColor()
. #16249 - Added methods to
DownloadItem
that enable customization of the save dialog options duringwill-download
events. #15497 - Added response header support to
protocol.registerFileProtocol
to matchprotocol.registerStreamProtocol
. #16098 - Added support for DesktopCapturerSource.appIcon. 1f55f163
- Added support for multiple browser views per
BrowserWindow
. #16148 - Added support for running preload scripts and nodeIntegration in iframes. #16425
- Allow for MacOS notifications to be immediately delivered. #16060
- Allow numpad keys to be used as accelerators. #15689
- Allow partial setting of window bounds with win.setBounds(). #15677
- Allow registering of multiple globalShortcuts. #15542
- Allowed filtering of
remote.getBuiltin()
,remote.getCurrentWindow()
,remote.getCurrentWebContents
and<webview>.getWebContents()
. #16293 - Converted
contentTracing.getCategories()
to return a promise instead taking a callback. #16624 - Converted
contentTracing.startRecording()
andcontentTracing.stopRecording()
to return a promise instead taking a callback. #16642 - Converted
debugger.sendCommand()
to return a Promise instead of taking a callback. #16931 - Converted
zoomLevel()
andzoomFactor()
forwebContents
and<webview>
to return a promise instead taking a callback. #16410 - Enabled
NodeIntegrationInSubFrames
option usage forwebview
tags. #17398 - Enabled the setuid sandbox on Linux, allowing Electron to launch sandboxed processes in environments that disable CLONE_NEWUSER for unprivileged users. #17343
- Exposed an API to allow apps to determine their status as a trusted accessibility client. #16119
- Provided user system's region with
app.getLocaleCountryCode()
. #15035 - Mixed-sandbox mode works on Linux. #15870
- Promisified
app.getFileIcon
. #15742 - Promisified
shell.openExternal()
by splitting it into a sync and async method. #16176 - Promisified win.capturePage(). #15743
- Implemented the
browser-backward
andbrowser-forward
app-command
events available in BrowserWindow on Linux. #15441 - Unified behavior between the default app and packaged apps (application menu /
window-all-closed
handling). #16310 - Updated SpellCheck API to support asynchronous results. #14032
- Updated
Menu.buildFromTemplate()
to allow it to acceptMenuItem
s in addition to plain objects. #16783 - Updated WebContents.loadURL and loadFile to return a promise. #15855
Fixes
- 'win.setParentWindow(parent)' is now supported on Windows. #15775
- Fixed a crash on Linux when starting a sandboxed renderer: the
resourcesPath
property is no longer available onprocess
in sandboxed renderers. #15701 - Added new switch:
--disable-color-correct-rendering
. #15898 - Added a check for invalid menu index to prevent out-of-range crashes on insertion. #17435
- Added a patch to fix incorrect enumeration and instantiation of Node.js ciphers in the Crypto module. #16909
- Added missing buffer size check in
nativeImage.createFromBuffer
/nativeImage.addRepresentation
. Data URLs only parsed according to the MIME type as PNG or JPEG. #17568 - Allowed blocking of
desktopCapturer.getSources()
calls by handling thedesktop-capturer-get-sources
event. #15964 - Fixed a MacOS color picker dialog. #17254
- Be more lenient about whitespace in webview's "webpreferences" feature string. #15602
- Corrected windowMenu MenuItem role on MacOS. #15930
- Disabled CORB checks when web security preference is disabled. #15737
- Electron no longer forwards IPC filtering events to
app
for dev-tools and extensions. #16613 - Fixed hiddenInset titleBar console spam. #15576
- Fixed make certain values on
process
read-only. #15628 - Fixed move NativeWindow tracking to OSR WCV. #15585
- Fixed Chromium sandbox v2 related crashes in MAS builds. #16969
- Fixed
<webview>
not working withcontextIsolation
+sandbox
. #16469 - Fixed
<webview>
tag not working when usingcontextIsolation
. #16067 - Fixed
defaultId
not taking affect when set to0
and no "cancel" button was present on macOS. #17150 - Fixed
webContents.print()
not working correctly. #17117 - Fixed
windowmenu
role not showing the window list on macOS. #16387 - Fixed a bug that made all cookies non persistent. . #15836
- Fixed a bug when retrieving security scoped bookmarks in
ShowOpenDialog
andShowSaveDialog
. #17177 - Fixed a bug where
window.opener
of a window created with window.open from a sandboxed renderer was null. #15821 - Fixed a bug which caused global shortcuts with the Windows key not to work properly on Windows. #17566
- Fixed a crash when calling ECDH.setPrivateKey(). #17296
- Fixed a problem where the focus would move to the browser window after the user (SHIFT +) tabbed through all the elements in the page (#12919). #16042
- Fixed an assertion when calling
ECDH.getPrivateKey()
,diffieHellman.generateKeys()
ordiffieHellman.get*()
. #17255 - Fixed an issue where
Notification
objects constructed in the main process would randomly not be shown to the user. #17484 - Fixed an issue where data streamed from registerStreamProtocol could be truncated before completion. #16553
- Fixed an issue where on Linux, the setuid sandbox was incorrectly enabled when passing
--enable-mixed-sandbox
. #15722 - Fixed an issue whereby foreground visibility of a window was not correctly taken into account for
win.isVisible()
on macOS. #17491 - Fixed an issue with netLog module properties not being returned correctly. #17545
- Fixed an issue with promise methods not resolving correctly over ipc in the renderer process. #16433
- Fixed and re-enabled osr after it was turned off following updates to Chromium 71/72. #16616
- Fixed app freeze when using custom stream protocol. #17264
- Fixed broken save dialog on macOS for
<a>
downloads. #16640 - Fixed a bug that caused menu accelerators to stop working on some linux. #15094
- Fixed child windows invisible if opened with window.open from BrowserView with nativeWindowOpen enabled. #12686
- Fixed crash on exit when using
BrowserView
. #15541 - Fixed crash when
nativeImage.createFromBuffer()
is called with invalidbuffer
. #17374 - Fixed crash when calling setProgressBar on macOS. #16728
- Fixed crash when passing callbacks which return
undefined
to some APIs. #17481 - Fixed crash when showing a tray menu while one is already shown. #17509
- Fixed default font fallback for non-latin scripts. #15486
- Fixed defunct processes after quitting. #16672
- Fixed incorrect display of 'zoom in' accelerator on mac. #15502
- Fixed incorrect foreground color on GTK menubar. #15878
- Fixed issue where preload scripts would sometimes run twice in the same process in different contexts resulting in broken native node module loading. #17597
- Fixed issue whereby a user was not well informed when interacting with a menu submenu that did not have any visible
MenuItems
. #16848 - Fixed memory leak caused by webFrame.setSpellCheckProvider. #16525
- Fixed memory leak when using webFrame and spell checker. #16851
- Fixed missing remote object error when calling remote function created in preload script. #15444
- Fixed regression regarding
localStorage
quota not being bypassed. #15596 - Fixed returning headers with multiple values for stream protocols. #14887
- Fixed session preload scripts not being executed in sandboxed renderers. #16578
- Fixed some MAS rejection errors by removing usages of private APIs. #17293
- Fixed some accelerators having
Shift
appended to them twice . #15400 - Fixed submenus not responding to the
visible: false
MenuItem
property. #16846 - Fixed support for precision trackpad/mouse scrolling on Windows. #15830
- Fixed the
enable
property having no effect for top-level submenuMenuItems
. #16858 - Fixed the handling of the escape key in dialogs created by
window.confirm
. The "Cancel" button is now triggered by the escape key, and the "OK" button is now triggered by the return key. #17578 - Implemented proper Location object for BrowserWindowProxy. #15019
- Improved the contrast/visibility of the "focused" menu item in menus on Windows. #17360
- Injected chrome extensions that have content scripts with a
.
in thepattern
field now treat it as a raw.
instead of a wildcard. #17594 - Launching the node inspector through
--inspect
now listens on the correct port when one is provided. #17439 - Made getUserMedia APIs work again on C72+ (backport: 5-0-x). #16768
- Moved
webFrame
custom scheme APIs to browser process underprotocol
. #16625 - Added missing require in chromium-spec #16153
- Restored support for AES-CFB cipher, which was lost when switching from OpenSSL to BoringSSL. #16618
- Restored support for RIPEMD160 digest, which was lost when switching from OpenSSL to BoringSSL. #16572
- Fixed support async child process methods without callback in asar. #15927
- The
safeDialogs
webPreferences option now actually works onfile://
URLs. #17579 - TouchBarSegmentedControl instances now correctly update when you update the
segments
array and removelabel
orimage
dynamically. #17334
Other Changes
- Switched to V2 sandbox on mac. #15647
- Fixed Windows Electron tests to run first to show those failures first#16655
- Added
webFrame.setIsolatedWorldInfo
API and deprecated related APIs. #16932 - Added legacy callback function tests to prevent regressions as the promisification initiative continues. #16436
- Deprecated
ServiceWorker
APIs onWebContents
in preparation for their removal. #16732 - Fixed version bump script for first beta. 29e5195c
- Improved tray icon context menu and menu bar accessibility. #15302
- Merged code in
brightray
intoatom
. #15240 - Exposed missing
process.getCreationTime()
in sandboxed renderers. #15824 - Removed
api::WebContents::CreateFrom
. #15241 - Removed hardcoded Google API key. #15478
- Removed potential double free when managing WebContents. #15280