title: How do I change the change the color inside the iframe - React
body: <p>I am trying to change the iframe body color via react component. But I couldn't find the solution how to do this. This is my src code. In the</p>
  <pre><code>public componentDidMount(): void {
      var frame = document.getElementById('myFrame');
      var body = frame.contentWindow.document.querySelector('body');
      body.style.color = 'red';
    }
  </code></pre>
  <p>But this is not working. I am getting the below error.</p>
  <pre><code>Property 'contentWindow' does not exist on type 'HTMLElement'.ts(2339)
  </code></pre>
  <p>Could anyone help to resolve this problem? Thanks in advance.</p>