title: Error: Permission denied to access property 'document' in iFrame
body: <p>I have a parent html page which uses jquery to append a dynamic iframe which has a source to another domain. I have already set the X-Frame-Options to allow this and loading plain content is not a problem. In fact all my other scripts seem to be working fine.</p>
  
  <p>The html page which loads in the iFrame, uses the <a href="https://github.com/snikch/jquery.dirtyforms" rel="nofollow">jQuery DirtyForms plugin</a> which has several lines which look like <strong>$(document)</strong>. Both the dirty forms code and jQuery scripts are local to the iframe's document.</p>
  
  <p>When the any of these lines executes, I receive the following error in Firefox ( I have not tested any other browsers), Error: Permission denied to access property 'document'.</p>
  
  <p>I have been reading up on this and this seems to be a problem if the parent page is trying to access the child's scripts or visa-versa, but in my case, the scripts that are erring are local to the child.</p>
  
  <p>BTW. The child code, when NOT loaded within the iFrame, works perfectly.</p>
  
  <p>I am at a loss right now to find a work-around.</p>
  
  <p>I assume that $(document) is somehow being evaluated as the parent.</p>
  
  <p>Is there some way of correcting this behavior? Perhaps by modifying the plug-ins code. Perhaps, $(document).find('contentWindow')...??</p>
  
  <p>I appreciate the help! Thanks.</p>