title: parent.document gives undefined in Chrome
body: <p>I have two level parent-child iframe hierarchy in my HTML pages. I want to get an object of parent window document in its child document for some manipulation. I works majorly with Google Chrome.</p>
  
  <p>parent.document gives 'undefined' in Google Chrome, while in Mozilla it works fine. What's the catch?</p>
  
  <p>For reference, please find below the content of the three files demonstrating the issue,</p>
  
  <p><strong>First file: 'one.html'</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;input type="hidden" id="one_1" name="one_1" /&gt;
      &lt;iframe id="one" name="one" src="two.html"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Second file: 'two.html'</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;input type="hidden" id="two_1" name="two_1" /&gt;
      &lt;iframe id="two" name="two" src="three.html"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Third file: 'three.html'</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  
      function callme() {
          alert(parent.document)
          alert(top.document)
      }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;input type="hidden" id="three_1" name="three_1" /&gt;
      &lt;button id="click" name="click" onclick="return callme()"&gt;Click Me&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Assuming that 'one.html' is opened with Google Chrome, when I click on the 'Click Me' button, two successive alert boxes appears with 'undefined' value. When I open 'one.html' in Mozilla, it gives two 'objectHTMLDocument' valued alert boxes appears.</p>
  
  <p>Please find below the console messages while clicking on 'Click Me' button,</p>
  
  <pre><code>Unsafe JavaScript attempt to access frame with URL file:///C:/Users/user/Desktop/two.html from frame with URL file:///C:/Users/user/Desktop/three.html. Domains, protocols and ports must match.
                                                                   three.html:6
  callme                                                           three.html:6
  onclick                                                         three.html:13
  
  Unsafe JavaScript attempt to access frame with URL file:///C:/Users/user/Desktop/one.html from frame with URL file:///C:/Users/user/Desktop/three.html. Domains, protocols and ports must match.
                                                                   three.html:7
  callme                                                           three.html:7
  onclick                                                         three.html:13
  </code></pre>
  
  <p>Thanks in advance.</p>