workflow_launcher/preload.js

9 lines
283 B
JavaScript
Raw Normal View History

2024-03-11 11:01:07 -04:00
const { contextBridge, ipcRenderer, ipcMain } = require('electron')
contextBridge.exposeInMainWorld('functions', {
run: (value) => ipcRenderer.invoke('run', value),
onTaskCompleted: (callback) => ipcRenderer.on('task-completed', (_event, value) => {
callback(value)
})
})