Star us on GitHub
Star
Welcome to highlight.io
Company
Mission & Values
Compliance & Security
Open Source
Getting Started
Overview
Fullstack Mapping
Backend / Server
Frontend / Client
Fullstack Frameworks
Product Features
Session Replay
Error Monitoring
General Features
Logging
Integrations
Integrations Overview
Amplitude Integration
ClickUp Integration
Discord Integration
Electron Support
Front Integration
Height Integration
Intercom Integration
Linear Integration
Mixpanel Integration
Segment Integration
Slack Integration
Vercel Integration
Tips
Content-Security-Policy
Local Development
Monkey Patches
Performance Impact
Proxying Highlight
Session Search Deep Linking
Troubleshooting
Upgrading Highlight
Highlight.io Changelog
Changelog 12 (02/17)
Menu
Docs / Highlight Docs / Integrations / Electron Support

Electron Support

If you are running Highlight in Electron, a Desktop based JS framework, you can benefit from the additional functionality that tracks main process window events to stop and start Highlight recording when your app is minimized.

Please ensure you are using Highlight SDK version highlight.run@4.3.4. or higher. Call configureElectronHighlight with a BrowserWindow object to instrument Electron events.

const mainWindow = new BrowserWindow(...) configureElectronHighlight(mainWindow)
Copy

Under the hood, the function will forward the focus and blur events to your renderer process so that the highlight recording SDK can track them.

mainWindow.on('focus', () => { mainWindow.webContents.send('highlight.run', { visible: true }); }); window.on('blur', () => { mainWindow.webContents.send('highlight.run', { visible: false }); });
Copy

This will stop all highlight recording when the app is not visible and resume the session when the app regains visibility to help minimize performance and battery impact that Highlight may have on Electron users.