title: Parse a HTML String with JS without triggering any page loads?
body: <p>As <a href="https://stackoverflow.com/a/10585079/15055">this answer</a> indicates, a good way to parse HTML in JavaScript is to simply re-use the browser's HTML-parsing capabilities like so:</p>
  
  <pre><code>var el = document.createElement( 'html' );
  el.innerHTML = "&lt;html&gt;&lt;head&gt;&lt;title&gt;titleTest&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;a href='test0'&gt;test01&lt;/a&gt;&lt;a href='test1'&gt;test02&lt;/a&gt;&lt;a href='test2'&gt;test03&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;";
  // process 'el' as desired
  </code></pre>
  
  <p>However, this triggers loading extra pages for certain HTML strings, for example:</p>
  
  <pre><code>var foo = document.createElement('div')
  foo.innerHTML = '&lt;img src="http://example.com/img.png"&gt;';
  </code></pre>
  
  <p>As soon as this example is run, the browser attempts to load the page:</p>
  
  <p><a href="https://i.stack.imgur.com/hdcK7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hdcK7.png" alt="enter image description here"></a></p>
  
  <p>How might I process HTML from JavaScript <em>without</em> this behavior?</p>