slimerjs-firefox
Version:
This repo includes slimerjs as well as downloads a local copy of Firefox.
15 lines (14 loc) • 516 B
HTML
<html>
<head><title>foo</title>
<script type="text/javascript">
window.addEventListener("beforeunload", function(e) {
var confirmationMessage = "Confirm to close";
// note: recent version of gecko (20+ ?), confirmation message is not displayed anymore
(e || window.event).returnValue = confirmationMessage; //Gecko + IE
return confirmationMessage;
}, true);</script>
</head>
<body>
<a id="a" href="simplehello.html " style="position:absolute; top:0px; left:0px">Simple Hello </a>
</body>
</html>