gecko/docshell/test/file_bug385434_4.html

37 lines
1.0 KiB
HTML

<!--
Inner frame for test of bug 385434.
https://bugzilla.mozilla.org/show_bug.cgi?id=385434
-->
<html>
<head>
<script type="application/javascript">
window.addEventListener("hashchange", function() {
parent.statusMsg("Hashchange in 4a.");
parent.onIframeHashchange();
}, false);
window.addEventListener("load", function() {
parent.statusMsg("Load listener.");
document.location.hash = "foo";
// synchronously wipe out the whole document. The new document shouldn't
// have a hashchange event dispatched to it.
document.open();
window.addEventListener("hashchange", function() {
parent.statusMsg("Hashchange in 4a after document.open()");
parent.onIframeHashchange();
}, false);
}, false);
</script>
</head>
<body>
<!-- This page is loaded in an iframe 100px high, so the div below forces #foo
off the screen, and we can count that focusing it will trigger a scroll.-->
<div style="height:200px"></div>
<a name="foo">Foo</a>
</body>
</html>