Change8

v38.0.0

Breaking Changes
📦 electronView on GitHub →
1 breaking17 features🐛 9 fixes🔧 19 symbols

Summary

Electron v38.0.0 updates the core stack to Chromium 140, Node 22.18, and V8 14.0. It introduces new window management options, enhanced macOS tray/menu features, and several stability fixes for dialogs and web content loading.

⚠️ Breaking Changes

  • Inherited breaking changes from Chromium 140; refer to the Electron 38 blog post for specific details on web platform changes.

Migration Steps

  1. Review the Electron 38 blog post for Chromium-specific breaking changes.
  2. Update code using app.getPath to utilize the new 'assets' key if applicable.
  3. If targeting macOS, consider implementing the 'guid' in Tray constructors for better icon persistence.

✨ New Features

  • Added 'before-mouse-event' to WebContents to allow intercepting and preventing mouse events.
  • Added 'fileBacked' and 'purgeable' fields to process.getSystemMemoryInfo() on macOS.
  • Added 'innerWidth' and 'innerHeight' options for window.open.
  • Added 'guid' Tray constructor option on macOS for persistent icon positioning.
  • Added webFrameMain.fromFrameToken(processId, frameToken) to retrieve WebFrameMain instances.
  • Added sublabel functionality for menus on macOS >= 14.4.
  • Added app.getRecentDocuments() support for Windows and macOS.
  • Added support for --no-experimental-global-navigator flag.
  • Added support for HIDDevice.collections.
  • Added screen.dipToScreenPoint(point) and screen.screenToDipPoint(point) on Linux X11.
  • Added support for customizing system accent color and active window border highlighting.
  • Added menu item roles 'palette' and 'header' on macOS.
  • Added support for node option --experimental-network-inspection.
  • Added priority and priorityIncremental options to net.request().
  • Added {get|set}AccentColor for Windows to modify window accent color after initialization.
  • Exposed win.isContentProtected() to check window protection status.
  • Added 'assets' as a queryable key for app.getPath().

🐛 Bug Fixes

  • Fixed dialog.showMessageDialog centering incorrectly to monitor instead of parent window.
  • Fixed macOS issue where users were unable to interact with webpages loaded via loadURL.
  • Fixed broken chrome://accessibility page.
  • Fixed crashes in addChildView() when adding a closed WebContentsView.
  • Fixed macOS file dialogs not allowing app bundle selection in extension filters.
  • Fixed incorrect Referer header in webContents.downloadURL().
  • Fixed macOS child process crash when application replacement triggers the sandbox.
  • Fixed crash when calling webContents.loadURL() from a failed loadURL catch handler.
  • Fixed crash when opening dialogs while windows are closing on macOS.

🔧 Affected Symbols

WebContentsprocess.getSystemMemoryInfowindow.openTraywebFrameMain.fromFrameTokenMenuapp.getRecentDocumentsHIDDevice.collectionsscreen.dipToScreenPointscreen.screenToDipPointnet.requestwin.getAccentColorwin.setAccentColorwin.isContentProtectedapp.getPathdialog.showMessageDialogwebContents.downloadURLwebContents.loadURLaddChildView