2023-08-28 11:23:10 +00:00
|
|
|
const { contextBridge, ipcRenderer } = require('electron/renderer')
|
2022-02-09 16:00:05 +00:00
|
|
|
|
|
|
|
contextBridge.exposeInMainWorld('electronAPI', {
|
2023-11-01 17:46:25 +00:00
|
|
|
onUpdateCounter: (callback) => ipcRenderer.on('update-counter', (_event, value) => callback(value)),
|
|
|
|
counterValue: (value) => ipcRenderer.send('counter-value', value)
|
2022-02-09 16:00:05 +00:00
|
|
|
})
|