[Project_owners] getting the visible range of an html doc?

Shawn Betts sabetts at vcn.bc.ca
Tue Oct 19 18:45:13 EDT 2004

Hi folks,

Is there a way to get a DomRange (for instance) of the visible portion
of a web page?

I'd like to write a function that highlights a string match on a webpage, but only
in the currently visible area.

nsiSelectionController has checkVisibility so I as a last resort I
could walk each node in the document to get a range. But..I'm hoping
there's an existing way.



More information about the Project_owners mailing list