blob: 4e376f321946a24262669af82d1d0cd92b5fc622 [file] [log] [blame]
<html>
<head>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
function unload()
{
alert("unload");
}
function load()
{
document.body.onunload = unload;
location = "data:text/html,You should NOT have seen an unload alert appear. This test attaches an unload handler via document.body.onunload. This works in Internet Explorer because JS properties are linked directly to HTML attributes, and the onunload attribute has this behavior. But it should not work in browsers that don't have this quirk.<script>if (window.layoutTestController) layoutTestController.notifyDone(); </" + "script>";
}
</script>
</head>
<body onload="load()">
start document
</body>
</html>