mirror of
https://github.com/upscayl/upscayl.git
synced 2026-02-19 11:55:37 -05:00
12 lines
433 B
JavaScript
12 lines
433 B
JavaScript
const { ipcRenderer, contextBridge } = require("electron");
|
|
|
|
// 'ipcRenderer' will be available in index.js with the method 'window.electron'
|
|
contextBridge.exposeInMainWorld("electron", {
|
|
send: (command, payload) => ipcRenderer.send(command, payload),
|
|
on: (command, func) =>
|
|
ipcRenderer.on(command, (event, args) => {
|
|
func(event, args);
|
|
}),
|
|
invoke: (command, payload) => ipcRenderer.invoke(command, payload),
|
|
});
|