title: Property 'contentDocument' does not exist on type 'HTMLElement'
body: <p>I am loading an svg file using Object element and from ts file am trying to read and modify svg(like coloring dynamicaly and creating some svg elements and appending to the existing svg), but am stuck with the below error:
  Property 'contentDocument' does not exist on type 'HTMLElement'</p>
  
  <p>am using Angular 7</p>
  
  <p>in app.component.html</p>
  
  <pre><code> &lt;object id="svg1" data="assets/10026_019.svg" type="image/svg+xml" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"&gt;&lt;/object&gt;
  </code></pre>
  
  <p>in app.component.ts</p>
  
  <pre><code>let obj=document.getElementById('svg1');
      let svg2=obj.contentDocument.querySelector("svg");
   let pt = svg2.createSVGPoint();
  </code></pre>
  
  <p>actually it is showing error(red line) at "contentDocument", but when I run the application it is working fine, even though error is there.
  But When I do ng build it is giving problem.</p>
  
  <p>not sure how I can get this error corrected for to build successfully</p>