mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
How to raise events for dom nodes in the back end of the application? #66
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
@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.
@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.