title: document.domain bug
body: <pre><code>Permission denied for &lt;http://www.guy.lt&gt; (document.domain=&lt;http://www.guy.lt&gt;) to get property Window.document from &lt;http://www.guy.lt&gt; (document.domain has not been set).
  </code></pre>
  
  <p>If this is not a bug, then how to explain such behavior? (or at least the error message) And, of course, how to fix it?</p>
  
  <p>The other strange thing is that in:</p>
  
  <pre><code>debug.log('0');
  document.domain = 'guy.lt';
  debug.log('1');
  document.domain = 'wwww.guy.lt';
  debug.log('2');
  </code></pre>
  
  <p><code>debug.log('2')</code> is never triggered. However, there is no error in the <code>console</code>. Script just stops executing.</p>