title: Can't get innerHTML from newly opened window
body: <p>I've read many questions about this issue here at StackOverflow, but nothing works. I'm trying to open a new HTML file from a HTML file and manipulate the elements. Here is a bit of HTML-code for newfile.html:</p>
  
  <pre><code>&lt;main&gt;  
    &lt;h1 id="myJob"&gt;&lt;/h1&gt;
  &lt;/main&gt;
  </code></pre>
  
  <p>And here is a code from the js-file:</p>
  
  <pre><code>newWindow = window.open("newfile.html", "Some title", "width=700, height=2500");
  
  newWindow.onload = function () {
    newWindow.document.getElementById("myJob").innerHTML ="hello";
  };
  </code></pre>
  
  <p>The window is opening, but nothing happens with the element.</p>
  
  <p>the full newfile.html looks like this:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;title&gt;Title&lt;/title&gt;
          &lt;link rel = "stylesheet" type ="text/css"
              href = "css/theCss.css"&gt;
              &lt;script src="myScript.js"&gt;&lt;/script&gt; 
     &lt;/head&gt;
          &lt;body&gt;
              &lt;main&gt;  
                  &lt;h1 id="myJob"&gt;&lt;/h1&gt;
              &lt;/main&gt;
          &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Hank</p>