On Jul 14, 8:26 am, Robert O'Callahan <[email protected]> wrote: > On 13/7/09 9:10 PM, Wen Shane wrote: > > > I am a rookie to Gecko. I want to use Gecko to get all anchors' > > position information in a rendered html page. What should I do? Do I > > need to read all the code under the layout directory? > > > I guess before rendering, Gecko must have calculated the position of > > all visible nodes in the HTML page. But the problem is I dont know > > where in the souce code Gecko calculates the nodes' visual position, > > and I have not found any API docs on how to do this either. > > > I am looking forward to your help. > > You can do this using JS, with getElementsByTagName('a') and getClientRects. > > Rob
Thanks, Rob Can I do it using C++, or python, cos I just want to use the position information of anchors as input to another program which will make some decisions on the importance of the anchors in the web page. _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

