aboutsummaryrefslogtreecommitdiffstats
path: root/test/data/core/dynamic_ready.html
blob: d900c95e13cf2fd560db8bd4da5a11c1760f7c1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<script src="../jquery-3.7.1.js"></script>
	<script>var $j = jQuery.noConflict();</script>
	<script src="../iframeTest.js"></script>
</head>
<body>
<iframe id="dont_return" src="../mock.php?action=wait&wait=30"></iframe>
<script>
	var timeoutId, $,
		timeoutFired = false;

	setTimeout(function () {
		// Load another jQuery copy using the first one.
		$j.getScript( "../../../dist/jquery.js", function () {
			$j( "#dont_return" ).attr( "src", "about:blank" );

			// document ready handled by the just-loaded jQuery copy.
			$(function () {
				clearTimeout( timeoutId );
				if ( !timeoutFired ) {
					startIframeTest( true );
				}
			});
		});

		timeoutId = setTimeout(function () {
			timeoutFired = true;
			startIframeTest( false );
		}, 10000);
	});
</script>
</body>
</html>