What is the proper way to get bounding box for HTML elements relative to the Window?
I'm writing a Firefox extension. I'm trying to limit it to just XUL+Javascript (no XPCOM). When I get a mouseover event for an HTML element, I need to get its bounding box in the windows coordinate system (that is the built-in XUL document browser.xul). The obvious place to start is to put something like this in the mouseover event handler: var rect = e.target.getBoundingClientRect(); Which is great, but that gives me the rect in the HTML document's coordinate system, which is relative to the upper left corner of the HTML drawing area. I want to display a xul:panel element using panel