title: Javascript window write callback
body: <p>Is there a way to for a parent to know when a child window has loaded it's content? Without any script in the child.</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>var printWindow = window.open('', '_blank');
  printWindow.document.write(clonedElement.html());
  printWindow.onreadystatechage = function() {
      console.log('this does not work.');
  };
  </code></pre>