bruno/main/preload.js

10 lines
305 B
JavaScript
Raw Normal View History

2022-03-05 18:37:48 +01:00
const { ipcRenderer, contextBridge } = require('electron');
contextBridge.exposeInMainWorld('electron', {
message: {
send: (payload) => ipcRenderer.send('message', payload),
on: (handler) => ipcRenderer.on('message', handler),
off: (handler) => ipcRenderer.off('message', handler),
}
});