mid dev 2
This commit is contained in:
22
alarm-adminpanel/dist-electron/preload.mjs
Normal file
22
alarm-adminpanel/dist-electron/preload.mjs
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
const electron = require("electron");
|
||||
electron.contextBridge.exposeInMainWorld("ipcRenderer", {
|
||||
on(...args) {
|
||||
const [channel, listener] = args;
|
||||
return electron.ipcRenderer.on(channel, (event, ...args2) => listener(event, ...args2));
|
||||
},
|
||||
off(...args) {
|
||||
const [channel, ...omit] = args;
|
||||
return electron.ipcRenderer.off(channel, ...omit);
|
||||
},
|
||||
send(...args) {
|
||||
const [channel, ...omit] = args;
|
||||
return electron.ipcRenderer.send(channel, ...omit);
|
||||
},
|
||||
invoke(...args) {
|
||||
const [channel, ...omit] = args;
|
||||
return electron.ipcRenderer.invoke(channel, ...omit);
|
||||
}
|
||||
// You can expose other APTs you need here.
|
||||
// ...
|
||||
});
|
||||
Reference in New Issue
Block a user