DEV Community

Discussion on: Build a desktop app with Electron and Svelte

Collapse
 
yozawiratama profile image
Yoza Wiratama

how to pass click event from svelte to electron? or call some electron function from svelte?

Collapse
 
johngicharu profile image
John Gicharu

Hi, you could try sending messages once the click event is detected to ipcMain. You might find this useful electronjs.org/docs/api/ipc-main

Collapse
 
khangnd profile image
Khang

I'm not sure if it's possible for the first one, due to the fact that Svelte and Electron are 2 separate processes, but the second one is doable. I would advise that you consult the Electron documentation for a better explanation.