Electron: v12.0.0 Release

Release date:
March 2, 2021
Previous version:
v12.0.0-nightly.20201118 (released November 18, 2020)
Magnitude:
2,519 Diff Delta
Contributors:
12 total committers
Data confidence:
Commits:

143 Features Released with v12.0.0

Top Contributors in v12.0.0

trop[bot]
nornagon
erickzhao
miniak
vadim-termius
sentialx
MarshallOfSound
electron-bot
dsanders11
NotWearingPants

Directory Browser for v12.0.0

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

Release Notes for v12.0.0

Stack Upgrades

Breaking Changes

  • Changed the default of crashReporter.start({ compress }) from false to true. #25288
  • Changed the default value of contextIsolation to true. #27949
  • Changed the default value of worldSafeExecuteJavaScript to be true. #27502
  • Deprecated the remote module. It is replaced by @electron/remote. [#25293]
  • Deprecated the new-window event of WebContents. It is replaced by webContents.setWindowOpenHandler(). #24517

Features

Additions

  • Added APIs to enable/disable spell checker. #26276
  • Added Serial API support. #25237
  • Added BrowserWindow.isTabletMode API. #25209
  • Added displayFrequency to the Display object to allow getting information about the refresh rate on Windows. #26472
  • Added event.senderFrame property returning the originating webFrameMain of the IPC message. #27047
  • Added exitCode to render-process-gone details. #27677
  • Added frame and webContents properties to the details object in webRequest handlers. #27334
  • Added net.online for detecting whether there is currently internet connection. #21004
  • Added osProcessId / name properties to webFrameMain. #26093
  • Added powerMonitor.onBatteryPower. #26494
  • Added session.setSSLConfig() to allow configuring SSL. #25461
  • Added webFrameMain.send() / webFrameMain.postMessage(). #27366
  • Added webFrameMain API for accessing sub-frames of a WebContents instance from the main process. #25464
  • Added webPreferences.preferredSizeMode to allow sizing views according to their document's minimum size. #25874
  • Added a disabledCipherSuites option to Session.setSSLConfig. #25818
  • Added a new credentials option for net.request(). #25284
  • Added a new asynchronous shell.trashItem() API, replacing the synchronous shell.moveItemToTrash(). #25114
  • Added display-capture API for session.setPermissionRequestHandler. #27696
  • Added missing webFrameMain.executeJavaScriptInIsolatedWorld(). #27195
  • Added non-localized serviceName to 'child-process-gone' / app.getAppMetrics(). #25975
  • Added read/write support for Toast Activator CLSID in shortcuts. #25493
  • Added setWindowOpenHandler API for renderer-created child windows, and deprecate new-window event. #24517
  • Added spellcheck API to renderer. #25060
  • Added support for explicitly specifying direct, auto_detect or system modes in session.setProxy(). #24937
  • Added support for showing macOS share menu. #25629
  • Added fast user switching event to powerMonitor on macOS. #25321
  • Added extension-loaded, extension-unloaded, and extension-ready events to Session. #25385
  • Allowed ContextBridge exposeInMainWorld method to expose non-object APIs. #26834
  • Allowed setting the origin header and sec-fetch-* headers in net.request(). #26135
  • Implemented Electron Fuses for customizing certain Electron features at package time. #24241
  • The launchInfo of app event ready is now populated with information from UNNotificationResponse when the app is launched via a notification presented by UNUserNotificationCenter (in a native node module). #25950

Also in earlier versions...

  • Added allowFileAccess option to loadExtension() API. #27702 <span style="font-size:small;">(Also in 11)</span>
  • Added win.setTopBrowserView() so that BrowserViews can be raised. #27713 <span style="font-size:small;">(Also in 10, 11)</span>
  • Added support for some chrome.management APIs. #25098 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Made win.setAspectRatio() work on Windows. #27202 <span style="font-size:small;">(Also in 11)</span>

Improvements

  • Implemented custom Toast XML notifications on Windows
    • Added failure reporting of notifications on Window. #25401
  • Improved dark mode support on Windows. #25373 <span style="font-size:small;">(Also in 10, 11)</span>

Removed/Deprecated

  • Deprecated the remote module. It is replaced by @electron/remote. #25293
  • Deprecated the use of the vm module in the renderer process. #26087
  • Removed deprecated crashReporter APIs. #26709
  • Removed links to the Electron website from the default 'Help' menu in packaged apps. #25831
  • Removed private API usage that was blocking Mac App Store releases. #26491 <span style="font-size:small;">(Also in 11)</span>
  • Removed the desktopCapturer.getMediaSourceIdForWebContents() API. #25414 <span style="font-size:small;">(Also in 11)</span>

Fixes

  • Apps requesting the CAMERA_PAN_TILT_ZOOM permission will have the permission request handler called with a permission string of "media" instead of "font-access". #27422
  • Backported fix for https://crbug.com/1125165. #27596
  • BrowserWindow.fromWebContents() now returns an accurate result for WebContents in a BrowserView or webview. #25408
  • Enabled support for new Chromium experimental PDF viewer UI. #26010
  • Fixed BrowserWindow.fromBrowserView throwing an error when there were multiple BrowserViews in a window. #26493
  • Fixed PDF viewer failing to load resources. #27747
  • Fixed PDFs not loading in the PDF viewer. #27241
  • Fixed ses.setCertificateVerifyProc canceling requests in unrelated sessions. #26517
  • Fixed a crash in renderer process when loading non-context-aware modules with app.allowRendererProcessReuse enabled. #27317
  • Fixed a crash when calling crypto.createDiffieHellman() with certain parameters. #27700
  • Fixed a use-after-free error that could occur when destroying a WebContents during the did-stop-loading event. #26733
  • Fixed an issue that file length is not available in will-download event when file is downloaded thourgh intercepted request. #25324
  • Fixed an issue where IsMaximized would incorrectly return false for some windows on Windows. #26772
  • Fixed an issue where events on webview elements were missing properties if contextIsolation was enabled. #26289
  • Fixed an issue where net.request would continue downloading data even when the consuming stream was throttled. #25531
  • Fixed an issue where the buffer returned by NativeImage.getBitmap() could point to freed memory. #25782
  • Fixed an issue where the zoom button was missing for windows with titleBarStyle: hiddenInset on macOS. #27462
  • Fixed bug in which WebContents.mainFrame would sometimes return undefined. #27663
  • Fixed crash while exiting Electron after using the Web Serial API. #25969
  • Fixed error handling on write failure in the protocol module. #26296
  • Fixed intermittent access violation during redirects (intercepted requests). #25393
  • Fixed main process's console output not printing to devtools on Windows. #25765
  • Fixed menubar not clickable on Windows and Linux. #27555
  • Fixed missing presentation mode option in PDF viewer. #27262
  • Fixed using navigator.setAppBadge and navigator.clearAppBadge in Electron. #27431
  • Fixed webRequest module not recognizing the encoding of the filename in Content-Disposition header. #25961
  • Fixed window with customButtonsOnHover option not having rounded corner on macOS. #26960
  • Fixed chrome.runtime.getPlatformInfo crashing the background process upon being invoked. #25357
  • Backported fix for https://crbug.com/952922. #27598
  • Fixed ECDH.setPrivateKey() not updating the key. #27856
  • Fixed issue where window.open() would not return an object with a location.href setter when contextIsolation is enabled and nativeWindowOpen is disabled. #27940
  • Fixed race condition in electron.net implementation. #27938
  • Updated internal memory allocation logic such that you no longer need to use the com.apple.security.cs.allow-unsigned-executable-memory codesign entitlement on macOS. #26331
  • Updated the ICU time zone database to the latest 2020f version. #27370

Also in earlier versions....

  • Added Electron DLLs like libGLESv2.dll to symbol server. #26966 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Added default Bluetooth permission strings to info.plist. #26769 <span style="font-size:small;">(Also in 11)</span>
  • BrowserViews will properly resize within windows. #25951 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed "screen" methods to be reassignable again. #26868 <span style="font-size:small;">(Also in 11)</span>
  • Fixed CSP with unsafe-eval detection with Trusted Types. #27471 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed GdiTextPrinting when used with silent printing. #25679 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed OS-level shortcuts on macOS (e.g. Ctrl + F2, ⌘ + ~). #27769 <span style="font-size:small;">(Also in 11)</span>
  • Fixed &lt;webview&gt; not working with Trusted Types. #27467 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed LC_ALL environment variable getting changed in Electron. #26507 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed contentTracing.stopRecording() not rejecting when there is no trace in progress. #26656 <span style="font-size:small;">(Also in 11)</span>
  • Fixed protocol methods not being accessible via remote.protocol. #27043 <span style="font-size:small;">(Also in 11)</span>
  • Fixed readdir/readdirSync (w/ withFileTypes) failing on a deep directory within archive. #27011 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed screen methods not being accessible via remote.screen. #26661 <span style="font-size:small;">(Also in 11)</span>
  • Fixed systemPreferences.effectiveAppearance returning systemPreferences.getAppLevelAppearance(). #26879 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed a crash seen when printing. #25989 <span style="font-size:small;">(Also in 11)</span>
  • Fixed a crash that could occur on app quit when using the remote module. #27070 <span style="font-size:small;">(Also in 11)</span>
  • Fixed a crash when calling webContents.fromId with an unknown ID. #26651 <span style="font-size:small;">(Also in 11)</span>
  • Fixed a memory leak in desktopCapturer.getSources. #27058 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed a memory leak when creating BrowserWindows. #27641 <span style="font-size:small;">(Also in 11)</span>
  • Fixed an Uncaught TypeError when opening DevTools. #26474 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed an erroneous enableBlinkFeatures warning shown webviews which enabled no Blink features. #27790 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed an issue that a message box in GTK contains no buttons. #26917 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed an issue where BrowserViews couldn't be effectively reparented. #27187 <span style="font-size:small;">(Also in 11)</span>
  • Fixed an issue where SIGINT was improperly handled in Node.js processes. #26971 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed an issue where Save as PDF from PDF Viewer Print dialog failed and sometimes crashed. #25959 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed an issue where event.reply could sometimes not deliver a reply to an IPC message when cross-site iframes were present. #26925 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed an issue where deleted download directories would be sometimes recreated by the operating system. #27806 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed an issue where draggable regions did not work exclusively on BrowserViews on Windows. #26775 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed an issue where draggable regions in BrowserWindow causes BrowserView to become draggable in non-correspondent places. #26755 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed an issue where non-draggable regions on BrowserViews could have incorrectly calculated bounds. #27184 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed an issue where renderer process stack traces were broken with contextIsolation enabled. #26912 <span style="font-size:small;">(Also in 11)</span>
  • Fixed an issue where some async_hooks were not properly emitted after an error in the renderer process. #26990 <span style="font-size:small;">(Also in 11)</span>
  • Fixed an issue where some buttons were un-clickable in some BrowserViews with draggable regions enabled. #26496 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed an issue where some draggable regions were not clickable when loaded into BrowserViews on Windows. #27177 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed an issue whereby remote.screen EventEmitter methods are undefined in the renderer. #26988 <span style="font-size:small;">(Also in 11)</span>
  • Fixed an occasional crash on Windows related to NativeViewHost::SetParentAccessible. #26952 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed an occasional white flicker present when rendering BrowserViews in close succession. #27658 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed callbacks passed via the remote module not being released after all references are dropped. #26833 <span style="font-size:small;">(Also in 11)</span>
  • Fixed crash when a keyboard event immediately precedes calling browserWindow.close() on Windows. #27359 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed crash when destroying WebContents in the crashed event. #27756 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed crash when extension fails to load. #27589 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed detection of launch on login items
    • Fixed detection of enabled state set by TaskManager. #26515 <span style="font-size:small;">(Also in 11)</span>
  • Fixed import of unpacked node modules. #26750 <span style="font-size:small;">(Also in 11)</span>
  • Fixed issue where quitAndInstall() would not restart the app upon update completion on macOS Big Sur. #25864 <span style="font-size:small;">(Also in 11)</span>
  • Fixed maximized frameless window bleeding to other monitors. #25940 <span style="font-size:small;">(Also in 8, 9, 10, 11)</span>
  • Fixed memory leak when creating "Services" menu. #25617 <span style="font-size:small;">(Also in 9, 10, 11)</span>
  • Fixed memory leak when sending non-primitives over the context bridge. #27636 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed native window freeze on Windows when Electron app is sent to tray and external display changes. #27668 <span style="font-size:small;">(Also in 11)</span>
  • Fixed native window.open() to not use windowName/frameName as title by default. #27552 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed regression that crashed Electron when processing an invalid icon. #27463 <span style="font-size:small;">(Also in 11)</span>
  • Fixed shutdown crash when quitting with in-progress downloads. #27418 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed the pretty-print JavaScript feature in DevTools not functioning correctly. #25780 <span style="font-size:small;">(Also in 11)</span>
  • Fixed uncaught promise rejection when creating webContents with javascript disabled. #26869 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed chrome.webRequest extensions API not intercepting any requests. #27098 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed crash when loading wasm modules in child node process with mac arm64 > 11.2. #27685 <span style="font-size:small;">(Also in 11)</span>
  • Fixed slow child process spawning on macOS Big Sur. #27656 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed an issue where libuv might hang with multiple subframes when nodeIntegrationInSubframes is enabled. #27879 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed an out-of-bounds access in WebContents.sendInputEvent. #27855 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed navigator.bluetooth.requestDevice. #27927 <span style="font-size:small;">(Also in 11)</span>
  • Fixed background color not being applied for child windows created by native window.open path. #27942 <span style="font-size:small;">(Also in 10, 11)</span>
  • Fixed a potential crash when resetting BrowserViews. #27947
  • Increase stack size on windows x64 to 8MB. #27384 <span style="font-size:small;">(Also in 10, 11)</span>
  • Stopped using private API CTFontDescriptorIsSystemUIFont in MAS build. #26548 <span style="font-size:small;">(Also in 11)</span>
  • Updated setPermissionRequestHandler to correctly recognize permissions being requested. #26172 <span style="font-size:small;">(Also in 11)</span>

Other Changes

  • Windows 10 versions 2004 and later support WDA_EXCLUDEFROMCAPTURE and will now exclude a window entirely from screen capture when setContentProtection is enabled. Older Windows versions will continue to show a black window as before. #24274
  • Re-enable Rosetta on Apple Silicon devices. #26568 <span style="font-size:small;">(Also in 7.3, 8, 9, 10, 11)</span>

Documentation

End of Support for 9.x.y

Electron 9.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.