1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/lib/capybara/spec/views/with_slow_unload.erb

17 lines
No EOL
349 B
Text

<html>
<head>
<script>
function delay_unload() {
var start = new Date();
var i = 0;
while ((new Date()) - start < 1000){ i = i + 1; };
return null;
}
window.onbeforeunload = delay_unload;
window.onunload = delay_unload;
</script>
</head>
<body>
<div>This delays unload by 2 seconds</div>
</body>
</html>