v39.0.0
Breaking Changes📦 electronView on GitHub →
⚠ 2 breaking✨ 12 features🐛 12 fixes🔧 15 symbols
Summary
Electron v39.0.0 updates the core stack to Chromium 142 and Node 22.20.0, introduces HDR support for offscreen rendering, and implements breaking changes to offscreen texture handles and window.open resizing behavior.
⚠️ Breaking Changes
- The signature of OffscreenSharedTexture in the webContents.on('paint') event has changed. It now provides a unified 'handle' that holds the native handle and includes 'colorSpace' info. Update event listeners to use the new handle structure.
- window.open now strictly complies with specs and always creates a resizable popup window. Ensure UI layouts account for user-resizable windows where they were previously fixed.
Migration Steps
- Update 'paint' event handlers for offscreen rendering to use the new 'handle' property in OffscreenSharedTexture.
- Verify window resizing logic in applications using window.open to ensure spec-compliant resizable popups do not break layouts.
- If using app.getPath to locate resources, consider transitioning to the new 'assets' key.
✨ New Features
- Added RGBAF16 output format with scRGB HDR color space support to Offscreen Rendering.
- Added 'fileBacked' and 'purgeable' fields to process.getSystemMemoryInfo() on macOS.
- Added 'guid' option to Tray constructor on macOS for persistent icon positioning.
- Added webFrameMain.fromFrameToken(processId, frameToken) to retrieve WebFrameMain instances.
- Added granular accessibility support management methods.
- Added app.getRecentDocuments() support for Windows and macOS.
- Added support for USBDevice.configurations.
- Added systemPreferences.getAccentColor support for Linux.
- Added ability to get/set window accent colors on Windows post-initialization.
- Added persistence for File System API grant status within a session.
- Added 'assets' path key to app.getPath and switched internal asset locating to DIR_ASSETS.
- Added support for dynamic ESM imports in non-context isolated preloads.
🐛 Bug Fixes
- Fixed inverted colors in systemPreferences.getAccentColor.
- Fixed crash when calling webContents.openDevTools({ mode: 'detach' }) on Wayland.
- Fixed crash when accessing webContents.session.
- Fixed crash during inspector agent evaluation on provisional frames.
- Fixed crash when passing feature parameters via command line --enable-features.
- Fixed Wayland configuration via XDG_SESSION_TYPE environment variable.
- Fixed Windows dialog.showMessageBox default button handling.
- Fixed macOS file dialogs not allowing app bundle selection in extension filters.
- Fixed incorrect Referer header in webContents.downloadURL().
- Fixed macOS child process crash during application replacement/sandbox trigger.
- Fixed crash when calling webContents.loadURL() from a failed loadURL catch handler.
- Fixed crash when using -electron-corner-smoothing CSS rule without an associated document.
🔧 Affected Symbols
webContents.on('paint')OffscreenSharedTexturewindow.openprocess.getSystemMemoryInfoTraywebFrameMain.fromFrameTokenapp.getRecentDocumentsUSBDevice.configurationssystemPreferences.getAccentColorapp.getPathwebContents.openDevToolswebContents.sessiondialog.showMessageBoxwebContents.downloadURLwebContents.loadURL