logo       

Re: GetComputedStyle returning "auto": msg#00043

mozilla.devel.dom

Subject: Re: GetComputedStyle returning "auto"

Xiaolei Li wrote:
hi, i'm writing a c++ program that attempts to get position (ie, pixel
coordinates) of DOM nodes (text, img, table, etc) on a rendered page. I
thought GetComputedStyle with "left" and "top" would do it, but those
are just returning "auto"? DOM Inspector confirms this value.

That's the correct value.

what i want is what the Box Model in DOM Inspector reports for (x, y)
for all nodes in the document. how can i do this?

DOM inspector uses the Mozilla nsIBoxObject extension to get this property, iirc. See
http://lxr.mozilla.org/seamonkey/source/dom/public/idl/core/nsIDOMNSDocument.idl#60 and http://lxr.mozilla.org/seamonkey/source/layout/xul/base/public/nsIBoxObject.idl

-Boris


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise