title: How can I get the DOM element which contains the current selection?
body: <p>You can select a part of a web page with the mouse.</p>
  
  <p>I know that I can get the <a href="http://www.webreference.com/js/column12/crossbrowser.html" rel="noreferrer">currently selected text</a> but how can I get the DOM element which contains the start or end of the current selection?</p>