blob: 60ebe006b2ca2719e737c86982ae72ed4824c472 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="resources/print.js"></script>
</head>
<body>
<p>This page tests the beforeload event on script elements. You should see a PASS message below if everything
works.</p>
<hr/>
<div id="console"></div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function beforeLoadFunc()
{
print("PASS", "green");
event.preventDefault();
}
document.body.addEventListener("beforeload", beforeLoadFunc, true);
</script>
<script src="resources/fail.js"></script>
</body>
</html>