title: Uncaught TypeError: Cannot read property 'contentDocument' of undefined
body: <pre><code>function init() {
      document.getElementById('step1').innerHTML = document.getElementsByTagName('iframe')[0].contentDocument.document.body.innerHTML;
      document.getElementById('code1').value = document.getElementById('google_ads_frame1').src;
      document.technical1.submit();
  }
  </code></pre>
  
  <blockquote>
    <p>o erro se encontra na linha
                    document.getElementById'step1').innerHTML=document.getElementsByTagName('iframe')<strong>[0].contentDocument.document.body.innerHTML;</strong></p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/u8nWL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u8nWL.png" alt="enter image description here"></a></p>