How to raise events for dom nodes in the back end of the application? #66

Closed
opened 2026-01-29 16:29:44 +00:00 by claunia · 2 comments
Owner

Originally created by @NMSAzulX on GitHub (Nov 15, 2017).

Originally assigned to: @GregorBiswanger on GitHub.

And there is no a property named session in the webcontents.
But have to say It's a very good project, thanks.

Originally created by @NMSAzulX on GitHub (Nov 15, 2017). Originally assigned to: @GregorBiswanger on GitHub. And there is no a property named session in the webcontents. But have to say It's a very good project, thanks.
claunia added the question label 2026-01-29 16:29:44 +00:00
Author
Owner

@GregorBiswanger commented on GitHub (Nov 15, 2017):

Do you mean invoke a html click event as example?

Currently is only a communication with the backend and own JavaScript code possible with our IPC.

@GregorBiswanger commented on GitHub (Nov 15, 2017): Do you mean invoke a html click event as example? Currently is only a communication with the backend and own JavaScript code possible with our IPC.
Author
Owner

@yoDon commented on GitHub (Nov 15, 2017):

If you run the Electron.Net demo app and click on "Communicate between the two processes" there are some good examples of how to do this.

In a nutshell, you assign an onclick function or similar to your DOM object as you normally would in javascript. Inside that javascript function, call ipcRenderer.send("my-message", myValue); to call the backend C# method registered for "my-message" and pass it myValue as an argument. You can use a similar pattern to send messages from the backend to frontend javascript.

@yoDon commented on GitHub (Nov 15, 2017): If you run the Electron.Net demo app and click on "Communicate between the two processes" there are some good examples of how to do this. In a nutshell, you assign an onclick function or similar to your DOM object as you normally would in javascript. Inside that javascript function, call ipcRenderer.send("my-message", myValue); to call the backend C# method registered for "my-message" and pass it myValue as an argument. You can use a similar pattern to send messages from the backend to frontend javascript.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#66