Search code examples
javascriptfirefoxmozillagecko

Determining the bounding rectangle of Mozilla 4's content region


In versions of Firefox prior to 4, the web content was contained in a window of class "MozillaContentWindowClass". In the newer versions, the entire window is content-based, including toolbars, etc. Can anyone suggest the necessary Javascript code to determine the bounding rectangle (or at the very least the vertical offset) of the web content?


Solution

  • getBrowser().selectedBrowser.getBoundingClientRect()