9 lines
308 B
JavaScript
9 lines
308 B
JavaScript
const { contextBridge, ipcRenderer } = require('electron');
|
|
|
|
// Expose protected methods that allow the renderer process to use
|
|
// ipcRenderer without exposing the entire object
|
|
contextBridge.exposeInMainWorld('electron', {
|
|
isElectron: true,
|
|
getAppInfo: () => ipcRenderer.invoke('get-app-info'),
|
|
});
|