1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-12 01:40:53 +01:00
upscayl/main/preload.js
2022-11-12 02:11:28 +05:30

12 lines
537 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const electron_1 = require("electron");
// 'ipcRenderer' will be available in index.js with the method 'window.electron'
electron_1.contextBridge.exposeInMainWorld("electron", {
send: (command, payload) => electron_1.ipcRenderer.send(command, payload),
on: (command, func) => electron_1.ipcRenderer.on(command, (event, args) => {
func(event, args);
}),
invoke: (command, payload) => electron_1.ipcRenderer.invoke(command, payload),
});