How can I calculate the position of a DOM element from Google Chrome content scripts.

Posted by Ashish on Stack Overflow See other posts from Stack Overflow or by Ashish
Published on 2010-01-30T08:01:58Z Indexed on 2010/04/13 4:03 UTC
Read the original article Hit count: 341

Filed under:
|
|
|
|

Hi, I am writing a chrome extension and from the content script I want to calculate the absolute position of a DOM element. But from within content script, if i try to access offsetHeight, offsetWidth, offsetTop, offsetParent, etc, I get null. I guess content scripts don't have access to those DOM properties.

Is there a way/workaround, i can find those properties?

© Stack Overflow or respective owner

Related posts about chrome

Related posts about content