title: IE9: Access is denied when set up document.domain
body: <p>I have a problem when using document.domain with CLEditor on IE9. When I add document.domain I got error message "SCRIPT5: Access is denied.".  It works fine with Firefox and also when I remove document.domain. I still did not use cross sub-domain iframes, all iframes are in the same domain.</p>
  
  <p>How to fix it without removing document.domain?</p>
  
  <p>here is how I setup document.domain:</p>
  
  <pre><code>  &lt;script type="text/javascript" src="jquery-1.7.1.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      document.domain = 'mydomain.com';
    &lt;/script&gt;
    &lt;script type="text/javascript" src="jquery.cleditor.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Here is a part of the CLEditor code where error apears:</p>
  
  <pre><code>      // Create a new iframe
      var $frame = editor.$frame = $('&lt;iframe frameborder="0" src="javascript:true;" id="iframe"&gt;')
        .hide()
        .appendTo($main);
  
      // Load the iframe document content
      var contentWindow = $frame[0].contentWindow,
        doc = editor.doc = contentWindow.document,     // here is the error message
        $doc = $(doc);
  </code></pre>
  
  <p>Here is the full source code of CLEditor:
      <a href="http://premiumsoftware.net/cleditor/jquery.cleditor.js" rel="nofollow">http://premiumsoftware.net/cleditor/jquery.cleditor.js</a></p>