title: document.open does not work in Safari
body: <p>I have the following javascript code, I tried to test it in Chrome, Firefox and Opera, they all working fine, but on Safari, it generates error "undefined is not an object (evaluating 'x.document')", any idea on how to resolve it? Thanks.</p>
  
  <pre><code>var x = window.open();
  x.document.open();
  x.document.write('hello world');
  x.document.close();
  </code></pre>