Build a desktop app with Electron and Svelte Khang on March 27, 2021 Hello everyone, welcome to another article in the series Let's build something!, a series dedicated to building, well, something that involves seve... Read full post Submit Preview Dismiss Collapse Expand Andrew Wooldridge Andrew Wooldridge Andrew Wooldridge Follow JavaScript fan. Game maker. Story teller. Husband and father. Email triptych@gmail.com Location Redwood City, CA Work Sr. Front-end Engineer Joined Aug 24, 2017 • Feb 20 '22 Dropdown menu Copy link Hide Thanks for this! Collapse Expand Yoza Wiratama Yoza Wiratama Yoza Wiratama Follow Joined Aug 30, 2021 • Aug 30 '21 Dropdown menu Copy link Hide how to pass click event from svelte to electron? or call some electron function from svelte? Collapse Expand Khang Khang Khang Follow I bring joy and nostalgia to your daily life with my digital creations @Visnalize. Location Ho Chi Minh, Vietnam Work 💼 Unios / 🏠 Visnalize Joined Oct 18, 2020 • Aug 30 '21 Dropdown menu Copy link Hide 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. Collapse Expand John Gicharu John Gicharu John Gicharu Follow I am a Full-Stack developer primarily working with JavaScript and Frameworks in the JS Ecosystem such as React and Svelte, Express, etc. and Go. Joined Sep 1, 2021 • Sep 1 '21 Dropdown menu Copy link Hide 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 Expand Souk Syp. Souk Syp. Souk Syp. Follow Location Lyon, France Joined Mar 18, 2018 • Apr 21 '21 Dropdown menu Copy link Hide It works. Are there any hot reloading tricks? thanks for the tuto. Collapse Expand Khang Khang Khang Follow I bring joy and nostalgia to your daily life with my digital creations @Visnalize. Location Ho Chi Minh, Vietnam Work 💼 Unios / 🏠 Visnalize Joined Oct 18, 2020 • Apr 22 '21 Dropdown menu Copy link Hide Maybe try this electron-reload package, I personally haven't tried it but it looks fairly simple to use. Collapse Expand Souk Syp. Souk Syp. Souk Syp. Follow Location Lyon, France Joined Mar 18, 2018 • Apr 22 '21 Dropdown menu Copy link Hide Exactly what I need. Thanks ! Collapse Expand Brad Mehder Brad Mehder Brad Mehder Follow Joined Mar 6, 2021 • Apr 1 '21 Dropdown menu Copy link Hide Oh, man. The possibilities are endless. Thank you for sharing! Collapse Expand Khang Khang Khang Follow I bring joy and nostalgia to your daily life with my digital creations @Visnalize. Location Ho Chi Minh, Vietnam Work 💼 Unios / 🏠 Visnalize Joined Oct 18, 2020 • Apr 2 '21 Dropdown menu Copy link Hide My pleasure! Collapse Expand Abdallah Mohammed Abdallah Mohammed Abdallah Mohammed Follow My Github https://github.com/Abdallah-Moh Joined May 9, 2021 • May 30 '21 Dropdown menu Copy link Hide Finally got it working Github Repo Collapse Expand Solo Thought Solo Thought Solo Thought Follow Joined Nov 26, 2023 • Apr 11 '25 Dropdown menu Copy link Hide libraries are rapidly changing. These instructions are very old. Please update them latest Collapse Expand Khang Khang Khang Follow I bring joy and nostalgia to your daily life with my digital creations @Visnalize. Location Ho Chi Minh, Vietnam Work 💼 Unios / 🏠 Visnalize Joined Oct 18, 2020 • Apr 11 '25 Dropdown menu Copy link Hide That'd be $99, sir. Or you can do one and keep it always up-to-date. Code of Conduct • Report abuse
Thanks for this!
how to pass click event from svelte to electron? or call some electron function from svelte?
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.
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
It works. Are there any hot reloading tricks? thanks for the tuto.
Maybe try this electron-reload package, I personally haven't tried it but it looks fairly simple to use.
Exactly what I need. Thanks !
Oh, man. The possibilities are endless. Thank you for sharing!
My pleasure!
Finally got it working Github Repo
libraries are rapidly changing. These instructions are very old. Please update them latest
That'd be $99, sir. Or you can do one and keep it always up-to-date.