Page 1 of 1
How to obtain an element attribute when clicking not by JS
Posted: Wed Nov 20, 2024 1:45 pm
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
Re: How to obtain an element attribute when clicking not by JS
Posted: Thu Nov 21, 2024 11:46 am
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.
Re: How to obtain an element attribute when clicking not by JS
Posted: Fri Nov 22, 2024 6:52 am
by coater
Thank you very much!