jellyfin-web/dashboard-ui/bower_components/jquery/test/data/event/triggerunload.html

19 lines
425 B
HTML
Raw Normal View History

2016-01-14 10:04:42 -07:00
<!doctype html>
<html>
<script src="../../jquery.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" );
window.parent.iframeCallback( called && !error );
});
</script>
</html>