title: Use contentDocument in electron
body: <p>I need to work with local external SVG files and I also need to get some data from them. It means I need to reach them through the DOM and check its content.</p>
  <p>I am using <code>&lt;object id=&quot;svg-object&quot; data=&quot;./my_svg.svg&quot;&gt;&lt;/object&gt;</code> for the import and here is my code to reach the svg:</p>
  <pre><code>window.addEventListener('load', function () {
        var svgObject = document.getElementById('svg-object').contentDocument;
        var svg = svgObject.getElementsByTagName('svg')[0];
        console.log(svg);
      });
  </code></pre>
  <p>After some research and several fails I found out that is no longer working offline (or maybe I am missing something), It only works when I am on a server.</p>
  <p>My question is, how can I get around this, because I want to build and offline application using electron.</p>