docshell/test/file_anchor_scroll_after_document_open.html
author Hrishikesh Barman <hrishikeshbman@gmail.com>
Fri, 24 Mar 2017 19:14:16 +0530
changeset 349511 adb38e68486ec6f5b8114d776c2f806dac7c536b
parent 163149 4142d03082e1a76483be6b6736539edd749103ef
child 439120 58adc643dcdc20eccb4d30bc454b50420e96c020
permissions -rw-r--r--
Bug 1349905 - Make _beginRemoveTab consistently return a boolean. r=dao

<!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>