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.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

How to obtain an element attribute when clicking not by JS

Post Reply
coater
Posts: 187
Joined: Sat Sep 29, 2018 1:51 pm

How to obtain an element attribute when clicking not by JS

Post by coater »

when I click a web, How Can I obtain the clicked element attribute, not by JS, Thank you.

left mouse click not right
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to obtain an element attribute when clicking not by JS

Post by salvadordf »

Try the DomVisitor demo. It should be possible to iterate the DOM tree and check the ICefDomNode.ElementBounds using "window.devicePixelRatio" to convert to/from CSS pixels.

But using JavaScript is the recommended way to do this because it's a lot easier than using DomVisitor.
coater
Posts: 187
Joined: Sat Sep 29, 2018 1:51 pm

Re: How to obtain an element attribute when clicking not by JS

Post by coater »

Thank you very much!
Post Reply