title: How to get content currently being displayed in browser viewport
body: <p>How can I get an indication of what part of a long document is currently being displayed?</p>
  
  <p>E.g. if my html contains 1,000 lines<br>
     1<br>
     2<br>
     3<br>
  ...<br>
     999<br>
     1000  </p>
  
  <p>and the user is near the middle showing the 500th line then I would like to get "500\n501\n502" or something like that.</p>
  
  <p>Obviously most scenarios would be more complex than this, but my requirement is to find which text is currently being displayed in the browser viewport so I can show a status value appropriate to the current text.</p>
  
  <p>Thanks
  Martin</p>