2013-02-03 20:27:55 +00:00
|
|
|
<!doctype html>
|
|
|
|
<html>
|
2013-01-28 04:34:38 +00:00
|
|
|
<script src="../../jquery.js"></script>
|
2013-02-03 20:27:55 +00:00
|
|
|
<script>
|
|
|
|
function report( event ) {
|
|
|
|
var payload = {
|
2024-04-24 22:24:55 +00:00
|
|
|
source: "jQuery onbeforeunload iframe test",
|
2013-02-03 20:27:55 +00:00
|
|
|
event: event.type
|
|
|
|
};
|
2024-04-24 22:24:55 +00:00
|
|
|
return parent.postMessage( JSON.stringify( payload ), "*" );
|
2013-02-03 20:27:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
jQuery( window ).on( "beforeunload", function( event ) {
|
|
|
|
report( event );
|
2024-04-24 22:24:55 +00:00
|
|
|
} ).on( "load", function( event ) {
|
|
|
|
setTimeout( function() {
|
2013-02-03 20:27:55 +00:00
|
|
|
window.location.reload();
|
2024-04-24 22:24:55 +00:00
|
|
|
}, 50 );
|
|
|
|
} );
|
2013-02-03 20:27:55 +00:00
|
|
|
</script>
|
|
|
|
</html>
|