electron v12.0.0
Release Notes for v12.0.0
Stack Upgrades
- Chromium 89.0.4389.69
- Node v14.16.0
- v14.16.0 release notes
- v14.15.5 release notes
- v14.15.4 release notes
- v14.15.3 release notes
- v14.15.2 release notes
- v14.15.1 release notes
- v14.15.0 release notes
- v14.14.0 release notes
- v14.13.1 release notes
- v14.13.0 release notes
- v14.12.0 release notes
- v14.11.0 release notes
- v14.10.1 release notes
- v14.10.0 release notes
- v14.9.0 release notes
- v14.8.0 release notes
- v14.7.0 release notes
- v14.6.0 release notes
- v14.5.0 release notes
- v14.4.0 release notes
- v14.3.0 release notes
- v14.2.0 release notes
- v14.1.0 release notes
- v14.0.0 release notes
- V8 v8.9
Breaking Changes
- Changed the default of
crashReporter.start({ compress })fromfalsetotrue. #25288 - Changed the default value of
contextIsolationtotrue. #27949 - Changed the default value of
worldSafeExecuteJavaScriptto betrue. #27502 - Deprecated the
remotemodule. It is replaced by@electron/remote. [#25293] - Deprecated the
new-windowevent of WebContents. It is replaced bywebContents.setWindowOpenHandler(). #24517
Features
Additions
- Added APIs to enable/disable spell checker. #26276
- Added Serial API support. #25237
- Added
BrowserWindow.isTabletModeAPI. #25209 - Added
displayFrequencyto theDisplayobject to allow getting information about the refresh rate on Windows. #26472 - Added
event.senderFrameproperty returning the originatingwebFrameMainof the IPC message. #27047 - Added
exitCodetorender-process-gonedetails. #27677 - Added
frameandwebContentsproperties to the details object in webRequest handlers. #27334 - Added
net.onlinefor detecting whether there is currently internet connection. #21004 - Added
osProcessId/nameproperties towebFrameMain. #26093 - Added
powerMonitor.onBatteryPower. #26494 - Added
session.setSSLConfig()to allow configuring SSL. #25461 - Added
webFrameMain.send()/webFrameMain.postMessage(). #27366 - Added
webFrameMainAPI for accessing sub-frames of aWebContentsinstance from the main process. #25464 - Added
webPreferences.preferredSizeModeto allow sizing views according to their document's minimum size. #25874 - Added a
disabledCipherSuitesoption toSession.setSSLConfig. #25818 - Added a new
credentialsoption fornet.request(). #25284 - Added a new asynchronous
shell.trashItem()API, replacing the synchronousshell.moveItemToTrash(). #25114 - Added
display-captureAPI forsession.setPermissionRequestHandler. #27696 - Added missing
webFrameMain.executeJavaScriptInIsolatedWorld(). #27195 - Added non-localized
serviceNameto'child-process-gone'/app.getAppMetrics(). #25975 - Added read/write support for Toast Activator CLSID in shortcuts. #25493
- Added
setWindowOpenHandlerAPI for renderer-created child windows, and deprecatenew-windowevent. #24517 - Added spellcheck API to renderer. #25060
- Added support for explicitly specifying
direct,auto_detectorsystemmodes insession.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, andextension-readyevents toSession. #25385 - Allowed ContextBridge
exposeInMainWorldmethod to expose non-object APIs. #26834 - Allowed setting the
originheader andsec-fetch-*headers innet.request(). #26135 - Implemented Electron Fuses for customizing certain Electron features at package time. #24241
- The
launchInfoofappeventreadyis now populated with information fromUNNotificationResponsewhen the app is launched via a notification presented byUNUserNotificationCenter(in a native node module). #25950
Also in earlier versions...
- Added
allowFileAccessoption toloadExtension()API. #27702 (Also in 11) - Added
win.setTopBrowserView()so thatBrowserViews can be raised. #27713 (Also in 10, 11) - Added support for some
chrome.managementAPIs. #25098 (Also in 9, 10, 11) - Made
win.setAspectRatio()work on Windows. #27202 (Also in 11)
Improvements
- Implemented custom Toast XML notifications on Windows
- Added failure reporting of notifications on Window. #25401
- Improved dark mode support on Windows. #25373 (Also in 10, 11)
Removed/Deprecated
- Deprecated the
remotemodule. It is replaced by@electron/remote. #25293 - Deprecated the use of the
vmmodule in the renderer process. #26087 - Removed deprecated
crashReporterAPIs. #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 (Also in 11)
- Removed the
desktopCapturer.getMediaSourceIdForWebContents()API. #25414 (Also in 11)
Fixes
- Apps requesting the
CAMERA_PAN_TILT_ZOOMpermission 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 forWebContentsin aBrowserViewor webview. #25408- Enabled support for new Chromium experimental PDF viewer UI. #26010
- Fixed
BrowserWindow.fromBrowserViewthrowing an error when there were multipleBrowserViews in a window. #26493 - Fixed PDF viewer failing to load resources. #27747
- Fixed PDFs not loading in the PDF viewer. #27241
- Fixed
ses.setCertificateVerifyProccanceling requests in unrelated sessions. #26517 - Fixed a crash in renderer process when loading non-context-aware modules with
app.allowRendererProcessReuseenabled. #27317 - Fixed a crash when calling
crypto.createDiffieHellman()with certain parameters. #27700 - Fixed a use-after-free error that could occur when destroying a
WebContentsduring thedid-stop-loadingevent. #26733 - Fixed an issue that file length is not available in
will-downloadevent when file is downloaded thourgh intercepted request. #25324 - Fixed an issue where
IsMaximizedwould 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.requestwould 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: hiddenInseton macOS. #27462 - Fixed bug in which
WebContents.mainFramewould sometimes returnundefined. #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.setAppBadgeandnavigator.clearAppBadgein Electron. #27431 - Fixed webRequest module not recognizing the encoding of the filename in
Content-Dispositionheader. #25961 - Fixed window with
customButtonsOnHoveroption not having rounded corner on macOS. #26960 - Fixed
chrome.runtime.getPlatformInfocrashing 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-memorycodesign 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.dllto symbol server. #26966 (Also in 9, 10, 11) - Added default Bluetooth permission strings to
info.plist. #26769 (Also in 11) BrowserViews will properly resize within windows. #25951 (Also in 9, 10, 11)- Fixed "screen" methods to be reassignable again. #26868 (Also in 11)
- Fixed CSP with
unsafe-evaldetection with Trusted Types. #27471 (Also in 9, 10, 11) - Fixed
GdiTextPrintingwhen used with silent printing. #25679 (Also in 9, 10, 11) - Fixed OS-level shortcuts on macOS (e.g. Ctrl + F2, ⌘ + ~). #27769 (Also in 11)
- Fixed
<webview>not working with Trusted Types. #27467 (Also in 9, 10, 11) - Fixed
LC_ALLenvironment variable getting changed in Electron. #26507 (Also in 9, 10, 11) - Fixed
contentTracing.stopRecording()not rejecting when there is no trace in progress. #26656 (Also in 11) - Fixed
protocolmethods not being accessible viaremote.protocol. #27043 (Also in 11) - Fixed
readdir/readdirSync(w/withFileTypes) failing on a deep directory within archive. #27011 (Also in 10, 11) - Fixed
screenmethods not being accessible viaremote.screen. #26661 (Also in 11) - Fixed
systemPreferences.effectiveAppearancereturningsystemPreferences.getAppLevelAppearance(). #26879 (Also in 9, 10, 11) - Fixed a crash seen when printing. #25989 (Also in 11)
- Fixed a crash that could occur on app quit when using the remote module. #27070 (Also in 11)
- Fixed a crash when calling
webContents.fromIdwith an unknown ID. #26651 (Also in 11) - Fixed a memory leak in
desktopCapturer.getSources. #27058 (Also in 9, 10, 11) - Fixed a memory leak when creating
BrowserWindows. #27641 (Also in 11) - Fixed an Uncaught TypeError when opening DevTools. #26474 (Also in 10, 11)
- Fixed an erroneous
enableBlinkFeatureswarning shown webviews which enabled no Blink features. #27790 (Also in 10, 11) - Fixed an issue that a message box in GTK contains no buttons. #26917 (Also in 10, 11)
- Fixed an issue where
BrowserViews couldn't be effectively reparented. #27187 (Also in 11) - Fixed an issue where
SIGINTwas improperly handled in Node.js processes. #26971 (Also in 10, 11) - Fixed an issue where
Save as PDFfrom PDF Viewer Print dialog failed and sometimes crashed. #25959 (Also in 9, 10, 11) - Fixed an issue where
event.replycould sometimes not deliver a reply to an IPC message when cross-site iframes were present. #26925 (Also in 9, 10, 11) - Fixed an issue where deleted download directories would be sometimes recreated by the operating system. #27806 (Also in 10, 11)
- Fixed an issue where draggable regions did not work exclusively on
BrowserViews on Windows. #26775 (Also in 10, 11) - Fixed an issue where draggable regions in
BrowserWindowcausesBrowserViewto become draggable in non-correspondent places. #26755 (Also in 10, 11) - Fixed an issue where non-draggable regions on
BrowserViews could have incorrectly calculated bounds. #27184 (Also in 10, 11) - Fixed an issue where renderer process stack traces were broken with
contextIsolationenabled. #26912 (Also in 11) - Fixed an issue where some
async_hookswere not properly emitted after an error in the renderer process. #26990 (Also in 11) - Fixed an issue where some buttons were un-clickable in some BrowserViews with draggable regions enabled. #26496 (Also in 9, 10, 11)
- Fixed an issue where some draggable regions were not clickable when loaded into BrowserViews on Windows. #27177 (Also in 10, 11)
- Fixed an issue whereby
remote.screenEventEmittermethods are undefined in the renderer. #26988 (Also in 11) - Fixed an occasional crash on Windows related to
NativeViewHost::SetParentAccessible. #26952 (Also in 9, 10, 11) - Fixed an occasional white flicker present when rendering
BrowserViews in close succession. #27658 (Also in 10, 11) - Fixed callbacks passed via the
remotemodule not being released after all references are dropped. #26833 (Also in 11) - Fixed crash when a keyboard event immediately precedes calling
browserWindow.close()on Windows. #27359 (Also in 10, 11) - Fixed crash when destroying
WebContentsin thecrashedevent. #27756 (Also in 10, 11) - Fixed crash when extension fails to load. #27589 (Also in 10, 11)
- Fixed detection of launch on login items
- Fixed import of unpacked node modules. #26750 (Also in 11)
- Fixed issue where
quitAndInstall()would not restart the app upon update completion on macOS Big Sur. #25864 (Also in 11) - Fixed maximized frameless window bleeding to other monitors. #25940 (Also in 8, 9, 10, 11)
- Fixed memory leak when creating "Services" menu. #25617 (Also in 9, 10, 11)
- Fixed memory leak when sending non-primitives over the context bridge. #27636 (Also in 10, 11)
- Fixed native window freeze on Windows when Electron app is sent to tray and external display changes. #27668 (Also in 11)
- Fixed native
window.open()to not use windowName/frameName as title by default. #27552 (Also in 10, 11) - Fixed regression that crashed Electron when processing an invalid icon. #27463 (Also in 11)
- Fixed shutdown crash when quitting with in-progress downloads. #27418 (Also in 10, 11)
- Fixed the pretty-print JavaScript feature in DevTools not functioning correctly. #25780 (Also in 11)
- Fixed uncaught promise rejection when creating
webContentswith javascript disabled. #26869 (Also in 10, 11) - Fixed
chrome.webRequestextensions API not intercepting any requests. #27098 (Also in 10, 11) - Fixed crash when loading wasm modules in child node process with mac arm64 > 11.2. #27685 (Also in 11)
- Fixed slow child process spawning on macOS Big Sur. #27656 (Also in 10, 11)
- Fixed an issue where libuv might hang with multiple subframes when
nodeIntegrationInSubframesis enabled. #27879 (Also in 10, 11) - Fixed an out-of-bounds access in
WebContents.sendInputEvent. #27855 (Also in 10, 11) - Fixed navigator.bluetooth.requestDevice. #27927 (Also in 11)
- Fixed background color not being applied for child windows created by native window.open path. #27942 (Also in 10, 11)
- Fixed a potential crash when resetting
BrowserViews. #27947 - Increase stack size on windows x64 to 8MB. #27384 (Also in 10, 11)
- Stopped using private API
CTFontDescriptorIsSystemUIFontin MAS build. #26548 (Also in 11) - Updated
setPermissionRequestHandlerto correctly recognize permissions being requested. #26172 (Also in 11)
Other Changes
- Windows 10 versions 2004 and later support
WDA_EXCLUDEFROMCAPTUREand will now exclude a window entirely from screen capture whensetContentProtectionis enabled. Older Windows versions will continue to show a black window as before. #24274 - Re-enable Rosetta on Apple Silicon devices. #26568 (Also in 7.3, 8, 9, 10, 11)
Documentation
- Documentation revisions:
- tutorial/quick-start - #25760
- tutorial/notifications - #25901
- tutorial/native-file-drag-drop - #25939
- tutorial/recent-documents - #25941
- tutorial/macos-dock - #25985
- tutorial/keyboard-shortcuts - #25999
- tutorial/progress-bar - #26003
- tutorial/web-embeds - #26008
- tutorial/online-offline-events - #26017
- tutorial/represented-file - #26018
- tutorial/linux-desktop-actions - #26118
- tutorial/windows-taskbar - #26120
- tutorial/dark-mode - #26187
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.