I'm developing Firefox extension. For some statistics I need actual display coordinates of DOM Element inside browser.
I can get coordinates of:
- Required DOM Element inside viewport by calling it's
getBoundingClientRect()
(this takes scrolling into account, perfect). - The Window (
ChromeWindow
) itself by checking it'sscreenX
&screenY
properties.
But when I call getBoundingClientRects()
of browser, I get it coordinates excluding the size of window frame & borders drawn by system (tested on Mac). How to also count their (borders & frames) size independently for different operating systems?
Is it possible at all?