docshell/test/file_anchor_scroll_after_document_open.html
author Jon Coppeard <jcoppeard@mozilla.com>
Wed, 22 Aug 2018 14:54:17 +0100
changeset 432835 3f1d6721cab0d1668a2441f7b0b7d018f1ac6475
parent 163213 4142d03082e1a76483be6b6736539edd749103ef
child 439146 58adc643dcdc20eccb4d30bc454b50420e96c020
permissions -rw-r--r--
Bug 1469599 - Associate all module scripts in a module graph with DOM elements before execution r=hsivonen

<!DOCTYPE html>
<script>
  if (location.hash == "#target") {
    parent.postMessage("haveHash", "*");
  } else {
    document.addEventListener("DOMContentLoaded", function() {
      document.open();
      document.write("<!DOCTYPE html><html style='height: 100%'><body style='height: 100%'><div style='height: 200%'></div><div id='target'></div></body></html>");
      document.close();
      // Notify parent via postMessage, since otherwise exceptions will not get
      // caught by its onerror handler.
      parent.postMessage("doTest", "*");
    });
  }
</script>