1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-12-23 21:05:06 +01:00
upscayl/main/preload.js

12 lines
537 B
JavaScript
Raw Normal View History

2022-11-11 21:41:28 +01:00
"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),
});