electron v6.0.0
Release Notes for 6.0.0
Breaking Changes
- Upgraded to Chromium
76.0.3809.88, Node.js12.4.0, and V87.6.303.22 - Fixed disparity between
netmodule headers and Node.js'http.IncomingMessageheaders. #17517 - Made
ShowItemInFolderasynchronous with no return value. #17121 - Made app log directory creation opt-in with a new function
app.setAppLogsPath. #17841 - Removed
hasServiceWorkerandunregisterServiceWorkerAPIs from the WebContents modules. #16717
Promises
Electron 6.0 continues a project started in 5.0 to improve Promise support. See the project notes for more information.
These functions now return Promises and still support older callback-based invocation:
contentTracing.getCategories()#16583contentTracing.getCategories()#16583contentTracing.getTraceBufferUsage()#16600contents.executeJavaScript()#17312cookies.flushStore()#16464cookies.get()#16464cookies.remove()#16464cookies.set()#16464dialog.showCertificateTrustDialog()#17181inAppPurchase.getProducts()#17355inAppPurchase.purchaseProduct()#17355netLog.stopLogging()#16862session.clearAuthCache()#17259session.clearCache()#17185session.clearHostResolverCache()#17229session.clearStorageData()#17249session.getBlobData()#17303session.getCacheSize()#17185session.resolveProxy()#17222session.setProxy()#17222webContents.hasServiceWorker()#16535webContents.printToPDF()#16795webContents.savePage()#16742webFrame.executeJavaScript()#17312webFrame.executeJavaScriptInIsolatedWorld()#17312webviewTag.executeJavaScript()#17312
These functions now have two forms, synchronous and Promise-based asynchronous:
These functions now return Promises:
app.dock.show()#16904
Features
- Added
chrome.runtime.getManifestAPI for Chrome extensions. #16891 - Added
<webview>.getWebContentsId(), which does not depend of theremotemodule. #17407 - Added
all_framessupport for Chrome extension content scripts. #17258 - Added
disableHtmlFullscreenWindowResizeoption towebPreferencesto allow preventing window from resizing when entering HTML5 fullscreen. #17203 - Added
excludedFromShownWindowsMenuproperty to allow for windows to be excluded from the windows menu. #17404 - Added
process.getSystemVersion(), which is available in sandboxed renderers and returns the actual operating system version instead of kernel version on macOS. #16599 - Added
process.versions.electronto get the electron version in the forked process. #16450 - Added
renderer-process-crashedevent toapp, which is emitted when any renderer process crashes. #17315 - Added
requestingUrlandisMainFrameproperties to the permission request and permission check handlers details objects so that apps can check the origin of the requesting frame rather than the root frame. #18772 - Added
systemPreferences.getAnimationSettings()returning system animation settings provided by Chromium. #17382 - Added
tray.getTitle()to allow users to see the title set next to the status bar icon on macOS. #17385 - Added a new Event property
triggeredByAccelerator, which is called back in customclickevents onMenuItems. #16954 - Added ability disable fetching thumbnails for in
desktopCapturer.getSources(). #14906 - Added additional error information to errors thrown when using the
remotemodule. #17851 - Added an option to enable
MenuItemson macOS to work optionally whenvisible: false. #16853 - Added file preview for file picker in Linux. #16447
- Added flexible autoresize option for
BrowserViews inBrowserWindow. #16184 - Added native Touch ID authentication support for macOS. #16707
- Added new
app.allowRendererProcessReuseproperty that allows apps to disable the site instance overrides Electron has patched into Chromium. This can be used to prevent the automatic renderer process restarting that Electron currently does. #18554 - Added new
app.userAgentFallbackproperty to allow setting the app's useragent globally. #18473 - Added new
monochrome,internal,acceleratorEnabled,colorDepthanddepthPerComponentproperties to the Display API Structure. #16870 - Added new inspectSharedWorker() API to enable opening devtools for a shared worker. #16615
- Added safer
nativeImage.createFromBitmap(), which does not decode PNG/JPEG. #17337 - Added support for Scroll Lock accelerator. #16873
- Added world isolation to Chrome extension content scripts. #17032
- Allowed setting working directory in
app.setUserTasks()/app.setJumpList(). #18291 - Enabled
NodeIntegrationInSubFramesoption usage forwebviewtags. #17226 - Exposed
colorSpaceto theDisplayobject. #17405 - Feat: add native emoji and color picker methods for Windows and macOS. #17359
- Implemented
BrowserWindow.moveTop()on Linux/X11. #16629 - Moved
webFramecustom scheme APIs to browser process underprotocol. #16416 - Process now emits 'loaded' event in sandboxed renderers. #17680
Fixes
systemPreferences.isDarkMode()now correctly detects dark mode on macOS Catalina. #18958- Added missing
'page-title-updated'event onwebContentsto documentation. Also fixed forwarding of theexplicitSetargument when emitted onBrowserWindow. #18319 - Backported a Node.js patch that fixes an http/2 memory leak:. #18882
- Corrected a reversal of cancellation values in
showSaveDialogon the Windows platform. #18383 - Corrected the boolean cancellation value for
showOpenDialogon Windows. #18509 - DevTools Extensions now load correctly. #17614
- Enabled autofill popups on macOS. #16308
- Ensured that
webContents.hasServiceWorker()rejects with an error for invalid URLs. #16571 - Ensured using the
--inspect-brkargument does not cause a crash. #19332 - Fixed Chrome extension content scripts not loading in sandboxed renderer. #16218
- Fixed
<webview>not working in scriptable popups whennativeWindowOpenis enabled. #19218 - Fixed
app.getAppPath()returning default-app path when runningelectron appwith no package.json orelectron app/index.js. Now the directory containing the executed file is returned. #18888 - Fixed
beginFrameSubscriptionreturning blurred images on HiDPI displays. #17444 - Fixed
fs.promisesAPIs not working with ASAR paths. #18114 - Fixed
new-windowevent not being emitted from a link withtarget="_blank"in a sandboxed<webview>#18556 - Fixed
webContents.print()callback not returning boolean correctly in all cases. #18803 - Fixed
webFrame.setSpellCheckProvidermemory leak. #16448 - Fixed
window.open()not returningnullwhenallowpopupswas not set in a sandboxedwebview#18556 - Fixed
window.openernull after cross-origin navigation. #18624 - Fixed a crash in
systemPreferences.getAccentColor(). #18195 - Fixed a crash when failed to get devices in desktopCapturer on Windows. #17973
- Fixed a dialog crash when no BrowserWindow was passed. #18381
- Fixed a possible crash on exit. #17879
- Fixed a regression in Kerberos SPN generation. In the M69 upgrade, the default for the
enable_negotiate_portoption was inadvertently changed from false to true; this restores the former behavior and aligns with Chromium. #18285 - Fixed accidental breaking API change in the deprecated
dialog.*methods. #18724 - Fixed an issue on Windows where calling
.show()on a BrowserWindow did not focus the window. #18081 - Fixed an issue preventing the Flash plugin from loading on Linux. #17823
- Fixed an issue where tray.destroy was not working properly on some linux distros. #18218
- Fixed autohide taskbar not showing when frameless window is maximized. #18373
- Fixed bug where notifications with same tag wouldn't show more than once when first notification was auto dismissed in Windows 7. #18740
- Fixed building with
enable_run_as_nodedisabled. #18892 - Fixed case where the Promise returned by
loadURLandloadFilewould be rejected withERR_ABORTEDif you triggered a virtual navigation before the page had finished loading. E.g. Usedhistory.pushStateor setlocation.hash. #18143 - Fixed crash in BrowserWindow destructor after
win.webContents.destroy(). #18793 - Fixed crash that could occur while certain chrome devtools extensions were loaded. #19105
- Fixed crash when Electron run from SMB network share. #17909
- Fixed crash when creating certain types of windows in the
display-*events. #19022 - Fixed crash when quitting Electron with an inspector attached. #18077
- Fixed crash when starting with
--disable-gpu. #18904 - Fixed electron.zip size increase regression on Linux (compared to Electron 3) by stripping swiftshader libraries (
libEGL.so,libGLESv2.so). #18600 - Fixed exiting html fullscreen mode for embedded contents. #18775
- Fixed inconsistent behavior where modifying the buffer would change
nativeImagepixels, while decoded PNG / JPEG data is a copy. #17843 - Fixed issue where
getEffectiveApperanceandgetAppLevelAppearancewould returnunknowninstead of the correct value sometimes. #18690 - Fixed issue where
require('timers').setTimeoutwould sometimes never fire in the renderer process. #18961 - Fixed issue where
shell.openExternalwould not activate opened window on macOS. #18722 - Fixed issue where sandboxed renderers could sometimes leak globals outside of the preload script. #17712
- Fixed issues where some
chrome://*URLs would not render correctly. #18552 - Fixed loading of
node_modulesinside ASAR files. #18192 - Fixed macOS breakpad symbol files to include non-public symbols. #19155
- Fixed offscreen rendering not working with viz compositor. #17538
- Fixed race condition in the
desktopCapturermodule where some requests for sources would never be resolved or unhandled exceptions would be thrown in the main process. #18042 - Fixed race condition where the
remotemodule would sometimes fail to fetch properties of a remote object. #17464 - Fixed random flicker that occurred on macOS when performing fullscreen or workspace transitions. #18885
- Fixed setting src on
<webview>being too slow. #19190 - Fixed silent printing across platforms. #19037
- Fixed some chrome extension communication (
MessagePort.postMessage) not working. #19106 - Fixed the
input[type=file]element not showing a file dialog. #18341 - Fixed the callback of
beginFrameSubscriptionpassingBufferinstead ofNativeImage. #17548 - Focus methods no longer steal focus when users are active on other apps. #16400
- Improved the way frameless windows are handled on Windows. #16596
- Injected chrome extensions that have content scripts with a
.in thepatternfield now treat it as a raw.instead of a wildcard. #17593 - Migrated crashReporter to use crashpad on Windows. #18766
- Preloaded scripts for internal
<iframe>in<webview>are no longer executed whennodeIntegrationInSubFramesis enabled. #19298 - Removed inadvertently-included mojom.js files from distribution bundle. #18486
- Removed incorrectly published internal V8 symbols and CRT methods from node.lib, causing heap corruptions with Node.js modules using the dynamic CRT on Windows. #18619
- Removed non-existent
gpu-crashedevent on<webview>. #17317 - Spellcheck providers are now (again) called with contractions and their parts. #18538
- The
prefers-color-schemeCSS media query now works correctly. #19250 .executeJavaScriptwill never leave a Promise dangling now, scripts that fail to execute will correctly be rejected. #18714Uint8ArrayandUint16Arraycan now be sent correctly in Chrome ExtensionMessagePortinstances. #19252- Fixed popup.location.* setters when nativeWindowOpen is disabled. #19494
- Fixed an issue where windows symbol files were changed in a way that was incompatible with some symbolication tools. #19504
- Fixed issue where sometimes asynchronous node.js methods such as http, setImmediate and fs wouldn't call their callbacks for an incredibly long amount of time. #19467
- Fixed window menu background color when in dark mode on Windows 10. #19505
Other Changes
- Replaced
powerMonitorquerySystemIdleStateandquerySystemIdleTimewith synchronous APIs. #17144 - Added experimental support for building for Windows on Arm. #18625
- Converted
accessibilitySupportEnabledto a proper JS property onapp. #17362 - Converted
applicationMenuto a proper JS property on theappmodule. #17361 - Deprecated the options argument to session.clearAuthCache. #18131
- Enabled
sandboxand disabledremotemodule in default_app. #17318 - Enabled sandboxing of devtools and chrome extension background script host renderers. #16864
- Removed Vulkan mock ICD from electron.zip, which is only meant to be used for Chromium development. #18596
- Removed Vulkan validation layers DLLs from electron.zip, which are only meant to be used for Chromium development. #18062
- Removed deprecated modules internally using
remote.requirein sandboxed renderer context. Useremote.requireexplicitly instead (unless the remote module is disabled). #15957 - Removed native mksnapshot binaries for arm/arm64 as they no longer work. #17561
- Removed special handling that forced
dialogmethods called over theremotemodule to return their result synchronously but not block the main process. #17412 - The
clipboardmodule in renderers no longer depends on theremotemodule on Linux. #17200 - Improved the exception message thrown when
requirefails in sandboxed renderers. #17413