title: window.getSelection return html
body: <pre><code>function selected() {
     var selObj = window.getSelection();
  }
  </code></pre>
  
  <p><br/>
  This function returns selected text from a webpage. How do return the <strong>html</strong> of a selected area. Is this possible to do with an <code>&lt;img&gt;</code> and an <code>&lt;a&gt;</code> tag?</p>
  
  <p><br/>
  Here's the list of functions:<br>
  <a href="https://developer.mozilla.org/Special:Tags?tag=DOM&amp;language=en" rel="noreferrer">https://developer.mozilla.org/Special:Tags?tag=DOM&amp;language=en</a></p>