Electron.net: How to raise events for dom nodes in the back end of the application?

Created on 15 Nov 2017  路  2Comments  路  Source: ElectronNET/Electron.NET

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

question

Most helpful comment

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.

All 2 comments

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.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seanmars picture seanmars  路  5Comments

cdespinosaagmx picture cdespinosaagmx  路  3Comments

Blind-Striker picture Blind-Striker  路  3Comments

robalexclark picture robalexclark  路  6Comments

litch0 picture litch0  路  4Comments