4

I need an alternative to range.getBoundingClientRect() for FF3.6 (XULRunner 1.9.2). I cannot update to a newer XULRunner version.

Any help?

Wladimir Palant
  • 55,537
  • 12
  • 95
  • 123
Jonathan Naguin
  • 14,036
  • 5
  • 45
  • 74
  • 1
    I don't think that this is possible. You could go through all the elements contained in a range, call `element.getBoundingClientRect()` for them and merge the rectangles. But I guess that you want to know the position of text nodes and neither `element.getBoundingClientRect()` nor `document.getBoxObjectFor()` will work for those. – Wladimir Palant Sep 27 '11 at 10:25
  • @WladimirPalant But TextNode doesn't have getBoundingClientRect() function... – Jonathan Naguin Sep 27 '11 at 10:43
  • Yes, that's what I said. – Wladimir Palant Sep 27 '11 at 10:43
  • Can you explain what you need this for? – user683887 Sep 27 '11 at 10:54
  • @user683887 I need it to find the first visible content in the webpage. Similar to http://stackoverflow.com/questions/7484330/get-the-visible-range-in-firefox/7485879#7485879 – Jonathan Naguin Sep 27 '11 at 10:57

1 Answers1

0

Try looking into jQuery Plus Plus (jQuery++), specifically the Range object. http://www.jquerypp.com

Joe Johnson
  • 1,823
  • 15
  • 19