mirror of
https://github.com/jquery/jquery.git
synced 2024-12-09 08:04:24 +00:00
e5ffcb0838
Ref gh-3040 Closes gh-3049
20 lines
454 B
HTML
20 lines
454 B
HTML
<!doctype html>
|
|
<html>
|
|
<script src="../../jquery.js"></script>
|
|
<script src="../iframeTest.js"></script>
|
|
<script>
|
|
var called = false,
|
|
error = false;
|
|
|
|
window.onerror = function() { error = true; };
|
|
|
|
jQuery( window ).on( "beforeunload", function( event ) {
|
|
called = true;
|
|
return "maybe";
|
|
}).on( "load", function( event ) {
|
|
$( window ).triggerHandler( "beforeunload" );
|
|
startIframeTest( called && !error );
|
|
});
|
|
</script>
|
|
</html>
|