src: update build and dev
This commit is contained in:
@@ -1,22 +1 @@
|
||||
"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.
|
||||
// ...
|
||||
});
|
||||
"use strict";const o=require("electron");o.contextBridge.exposeInMainWorld("ipcRenderer",{on(...e){const[n,r]=e;return o.ipcRenderer.on(n,(t,...c)=>r(t,...c))},off(...e){const[n,...r]=e;return o.ipcRenderer.off(n,...r)},send(...e){const[n,...r]=e;return o.ipcRenderer.send(n,...r)},invoke(...e){const[n,...r]=e;return o.ipcRenderer.invoke(n,...r)}});
|
||||
|
||||
Reference in New Issue
Block a user