Cross Domain Iframe Access For Mozilla Firefox
<p>I would like to access a child iframe (iframe2) from a site having a URL suppose <strong>"<a href="http://example.com" rel="nofollow">http://example.com</a>"</strong> . I have this HTML format,</p>

<pre><code>&lt;html&gt;
    &lt;body&gt;
    &lt;iframe id="iframe1" src="https://example.com"&gt;
       &lt;iframe id="iframe2" src="https://example.com/page1"&gt;
       &lt;/iframe&gt;
    &lt;/iframe&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>

<p>But i am facing an error in the form of exception</p>

<blockquote>
  <p>"Permission denied to access property XXXXXX"</p>
</blockquote>

<p>When I used <code>iframe.contentWindow.document</code>. </p>

<p>I would like to access the content of <code>iframe2</code>. I am facing this problem in Firefox, I fixed this issue in Google Chrome using <code>window.history.pushstate</code>, which is a HTML5 API. But somehow the same code is not working in Firefox</p>

<p>I tried a lot many things but still not got any lead on it. Please help !! Thanks in Advance :)</p>