Electron v38.0.0

Latest Stable
npm
npm install --save-dev electron@38.0.0
yarn
yarn add --dev electron@38.0.0
Google ChromeChromium
140.0.7339.41
Node.jsNode.js
22.18.0
V8V8
14.0.365.4

Release Notes

Stack Upgrades

Breaking Changes

  • For breaking changes inherited via Chromium, see blog post

Features

Additions

  • Added before-mouse-event to allow intercepting and preventing mouse events in WebContents. #47280 (Also in 36, 37)

  • Added fileBacked and purgeable fields to process.getSystemMemoryInfo() for macOS. #48146 (Also in 37)

  • Added innerWidth and innerHeight options for window.open. #46749 (Also in 35, 36, 37)

  • Added tray.{get|set}AutosaveName to enable macOS tray icons to maintain position across launches. #48077 (Also in 36, 37)

  • Added webFrameMain.fromFrameToken(processId, frameToken) to get a WebFrameMain instance from its frame token. #47942

  • Added sublabel functionality for menus on macOS >= 14.4. #46887 (Also in 35, 36, 37)

  • Added support for app.getRecentDocuments() on Windows and macOS. #47924 (Also in 36, 37)

  • Added support for --no-experimental-global-navigator flag. #47370 (Also in 35, 36, 37)

  • Added support for HIDDevice.collections. #47391 (Also in 36, 37)

  • Added support for screen.dipToScreenPoint(point) and screen.screenToDipPoint(point) on Linux X11. #46211 (Also in 35, 36, 37)

  • Added support for customizing system accent color and highlighting of active window border. #47285 (Also in 35, 36, 37)

  • Added support for menu item role palette and header on macOS. #45538 (Also in 37)

  • Added support for node option --experimental-network-inspection. #46690 (Also in 35, 36, 37)

  • Added the priority and priorityIncremental options to net.request(). #42628 (Also in 36, 37)

  • Adds the ability to change window accent color on Windows after initial window initialization via {get|set}AccentColor. #47939 (Also in 36, 37)

Improvements

  • Exposed win.isContentProtected() to allow developers to check window protection status. #47242 (Also in 36, 37)

  • Internally switched to using DIR_ASSETS instead of DIR_MODULE/DIR_EXE to locate assets and resources, and added "assets" as a key that can be queried via app.getPath. #47950 (Also in 37)

Fixes

  • Fixed an issue where dialog.showMessageDialog showed a window incorrectly centered to monitor instead of parent window when passed. #48215

  • Fixed an issue where users on MacOS were unable to interact with a webpage loaded via loadURL. #47575

  • Fixed broken chrome://accessibility page. #47497

Also in earlier versions...

  • Fixed addChildView() crashes when adding a closed WebContentsView. #47099 (Also in 35, 36, 37)

  • Fixed a bug where app extensions filters didn't allow for selecting app bundles in macOS file dialogs. #47841 (Also in 36, 37)

  • Fixed a bug where the Referer header was not being set correctly when using webContents.downloadURL(). #47867 (Also in 36, 37)

  • Fixed a child process crash on macOS when the running application is replaced with one that has a newer implementation triggering the sandbox. #47783 (Also in 37)

  • Fixed a crash possible when calling webContents.loadURL() from a failed webContents.loadURL() call's catch handler. #48043 (Also in 36, 37)

  • Fixed a crash that could occur when opening some dialogs as windows are closing on macOS. #46927 (Also in 35, 36, 37)

  • Fixed a crash when adding the -electron-corner-smoothing CSS rule to a stylesheet with no associated document. #47785 (Also in 37)

  • Fixed a crash when calling desktopCapturer.getSources with an empty thumbnail size. #47652 (Also in 36, 37)

  • Fixed a crash when calling some webContents functions after window.close(). #47952 (Also in 36, 37)

  • Fixed a possible crash using the WebView tag and calling focus. #46979 (Also in 35, 36, 37)

  • Fixed a potential crash using session.clearData in some circumstances. #47361 (Also in 35, 36, 37)

  • Fixed an error when importing electron for the first time from an ESM module loaded by a CJS module in a packaged app. #46810 (Also in 35, 36, 37)

  • Fixed an issue on some older Windows versions where setContentProtection didn't work as expected. #47886 (Also in 36, 37)

  • Fixed an issue where app.accessibilitySupportEnabled didn't work as expected. #48060 (Also in 37)

  • Fixed an issue where net.isOnline() always returned true in utilityProcesses. #48151 (Also in 36, 37)

  • Fixed an issue where require('node:sqlite') didn't work. #47757 (Also in 36, 37)

  • Fixed an issue where shell.openPath was not non-blocking as expected. #48089 (Also in 36, 37)

  • Fixed an issue where webContents.print did not work as expected when mediaSize was not passed. #46937 (Also in 36, 37)

  • Fixed an issue where an invalid color passed as a string to accentColor would result in a white accent color. #47684 (Also in 37)

  • Fixed an issue where calling Fetch.continueResponse via debugger with WebContentsView could cause a crash. #47434 (Also in 35, 36, 37)

  • Fixed an issue where certain operations performed in a window close callback could trigger a crash. #47812 (Also in 36, 37)

  • Fixed an issue where child windows could crash if they were opened from a fullscreen parent and have roundedCorners set to false. #47681 (Also in 36, 37)

  • Fixed an issue where filters wouldn't apply in the specific case only one was passed. #46900 (Also in 36, 37)

  • Fixed an issue where dragging sometimes didn't work after the contextmenu event was emitted. #48224 (Also in 36, 37)

  • Fixed an issue where importing from electron/utility in an ESM file threw an error at runtime. #48019 (Also in 36, 37)

  • Fixed an issue where importing from electron/utility threw a ERR_MODULE_NOT_FOUND error at runtime. #47989 (Also in 36, 37)

  • Fixed an issue where printing PDFs with webContents.print({ silent: true }) would fail. #47378 (Also in 36, 37)

  • Fixed an issue where protected transparent windows inappropriately showed a titlebar after visibility change. #47241 (Also in 35, 36, 37)

  • Fixed an issue where snapped corner state wasn't properly restored after minimizing and then restoring. #48157 (Also in 36, 37)

  • Fixed an issue where the 'suspend' and 'resume' events could be emitted in duplicate. #47162 (Also in 35, 36, 37)

  • Fixed an issue where the accent border was drawn on all windows regardless of the window's active focused status. #47802 (Also in 36, 37)

  • Fixed an issue where the accent color would be accidentally inverted when set to match the system color. #48108 (Also in 36, 37)

  • Fixed an issue where the window flickers with either a light or dark color before loading the desired background color. #47022 (Also in 35, 36, 37)

  • Fixed an issue where the window required restart in order to recognize system accent color setting change. #47658 (Also in 36, 37)

  • Fixed an issue where transparent child windows on macOS were rendering a grey block as opposed to their correct contents. #46886 (Also in 35, 36, 37)

  • Fixed an issue where utility processes could leak file handles. #47525 (Also in 35, 36, 37)

  • Fixed an issue where video scrubbing would not correctly hold the new position on playback. #47965 (Also in 37)

  • Fixed an issue where windows opened with window.open would never be offscreen. #48026 (Also in 37)

  • Fixed an issue where windows used dark theme on Linux all the time without reacting to system theme changes. #47919 (Also in 37)

  • Fixed applying background material correctly when creating windows on Windows, restored animations, and also fixed the issue where dynamically setting the background material had no effect. #47814 (Also in 36, 37)

  • Fixed compilation error when disabling extensions and pdf_viewer. #47993 (Also in 37)

  • Fixed crash in autoUpdater on macOS when zip extraction failed. #47271 (Also in 34, 35, 36, 37)

  • Fixed crash in xdg portal version detection on startup. #47008 (Also in 35, 36, 37)

  • Fixed log files written to the current working directory on Windows. #44413 (Also in 35, 36, 37)

  • Fixed opening package paths as directory when treatPackageAsDirectory is enabled on macOS. #47077 (Also in 35, 36, 37)

  • Fixed potential deadlock inside app.getLoginItemSettings on macOS. #48094 (Also in 36, 37)

  • Fixed regression with directory selection in macOS dialogs. #47259 (Also in 35, 36, 37)

  • Fixed utilityProcess running user script after process.exit is called. #47469 (Also in 37)

  • Fixed xdg portal version detection for file dialogs on linux. #46905 (Also in 35, 36, 37)

  • Partially fixes an issue with printing a PDF via webContents.print() where the callback would not be called. #47377 (Also in 35, 36, 37)

  • Restored previous window-hiding behavior of win.setContentProtected() on Windows. #47020 (Also in 35, 36, 37)

Documentation

Notices

End of Support for 35.x.y

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