How can I get the name of the element when I click on a webpage with the mouse, without using DOM?
I guess I could somehow use javascript, but how and if, how can I get the value back to Delphi to process the value?
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Getting name of element when mouse is clicked
- salvadordf
- Posts: 4572
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Getting name of element when mouse is clicked
Hi,
There are several ways to do that.
There are several ways to do that.
- Use the GlobalCEFApp.OnFocusedNodeChanged event and read the node.name value. This event is executed in the render process and you will need to send a process message with the node name value to the browser process.
- Use JavaScript to get the node under the coordinates of the last mouse click and use a JavaScript extension to send the node name to the browser process.