This project is read-only.

Screen location/size of specific element

Jan 9, 2014 at 1:56 AM
Does anyone know if it is possible to determine the screen co-ordinates of a rendered HTML element?
Jan 9, 2014 at 8:31 AM
it is not currently implemented but theoretically possible.
its can be more complicated than "GetAttributeAt" as you may require to traverse the elements and not just get the inner most...
what is the scenario?
Jan 9, 2014 at 8:41 PM
The scenario is to provide a level of interactivity by using HTMLRenderer for presentation and PhantomJS for Javascript processing. ie: when an HTML element is clicked on HTMLRenderer, the co-ordinates can be passed through to PhantomJS to perform a 'real' click. Any changes in the resulting HTML can then be passed back to HTMLRenderer to re-render and display.

This approach should enable me to create a very lightweight 'browser' - obviously not general-purpose, but for specifically designed web-pages whose HTML is HTMLRenderer-friendly. I'm not sure how well it would work, but would be worth a try.
Jan 12, 2014 at 11:59 AM
I'm not sure how knowing the rectangle of each elements help you here...
Also won't it be better to just get the inner-most element that was clicked?
Jan 18, 2014 at 11:34 AM
I have added GetElementRectangle in hope it helps, otherwise I need to better understand the need to design a general purpose solution.