Update preload.js

Expose a new IPC channel
main
Nazım Gediz Aydındoğmuş 2 years ago
parent c2ee7b1cc7
commit 6f083b80d9

@ -1,8 +1,9 @@
const { contextBridge } = require('electron')
const { contextBridge, ipcRenderer } = require('electron')
contextBridge.exposeInMainWorld('versions', {
node: () => process.versions.node,
chrome: () => process.versions.chrome,
electron: () => process.versions.electron,
ping: () => ipcRenderer.invoke('ping'),
// we can also expose variables, not just functions
})

Loading…
Cancel
Save