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
  • 56,865
  • 12
  • 98
  • 126
Jonathan Naguin
  • 14,526
  • 6
  • 46
  • 75
  • 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,814
  • 16
  • 20