electron/docs/fiddles/system/system-app-user-information/app-information/preload.js

6 lines
176 B
JavaScript

const { contextBridge, ipcRenderer } = require('electron/renderer')
contextBridge.exposeInMainWorld('electronAPI', {
getAppPath: () => ipcRenderer.invoke('get-app-path')
})