N3RD/JN/EXT/OPENJS/sniffer/config.js
2023-07-25 20:23:38 +08:00

9 lines
266 B
JavaScript

const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('msg_center', {
send: (...args) => ipcRenderer.send('msg', ...args),
on: (fn) => {
ipcRenderer.on('msg', (event, ...args) => fn(event, ...args));
},
});