title: How to access the content of the "embed" tag in HTML
body: <p>I have an SVG file, and I don't want to paste it inside the HTML file because, well, it gets messy.
  So after consulting with w3schools, "embed" tag seemed the safest way to include an external SVG file into HTML.</p>
  
  <pre><code>&lt;embed src="path_to_svg" type="image/svg+xml" id='svgsource' /&gt;
  </code></pre>
  
  <p>However, I need to access the svg elements through DOM via javascript in the main html file. Unfortunately neither</p>
  
  <pre><code>document.getElementById('my_svg_id')
  </code></pre>
  
  <p>nor</p>
  
  <pre><code>document.getElementById('svgsource').contentDocument
  </code></pre>
  
  <p>works in any browser. Using "object" tag doesn't do the trick either.</p>