<html>
<head>
<title>Loading...</title>
<script>
window.onbeforeunload = function(e) { return 'foo'; };
</script>
</head>
<body>
<p>Navigate to another page to trigger beforeunload handler.</p>
</body>
</html>
<html>
<head>
<title>Loading...</title>
<script>
window.onbeforeunload = function(e) { return 'foo'; };
</script>
</head>
<body>
<p>Navigate to another page to trigger beforeunload handler.</p>
</body>
</html>