Build: Bump the github-actions group with 2 updates
[jquery.git] / test / data / readywait.html
blob8f88245d5275d0865b1a71ec808c3c6621f546df
1 <!DOCTYPE html>
2 <html>
3 <!--
4 Test for jQuery.holdReady. Needs to be a
5 standalone test since it deals with DOM
6 ready.
7 -->
8 <head>
9 <title>
10 jQuery.holdReady Test
11 </title>
12 <style>
13 div { margin-top: 10px; }
14 #output { background-color: green }
15 #expectedOutput { background-color: green }
16 </style>
17 <script src="../jquery.js"></script>
18 <script src="./iframeTest.js"></script>
20 <!-- Load the script loader that uses
21 jQuery.readyWait -->
23 <script type="text/javascript">
24 (function() {
25 var released = false;
26 // Hold on jQuery!
27 jQuery.holdReady( true );
29 setTimeout( function() {
30 released = true;
31 jQuery.holdReady( false );
32 }, 300 );
34 jQuery(function() {
35 jQuery( "#output" ).text( "Ready called, holdReady released: " + released );
36 startIframeTest( released );
37 });
38 })();
39 </script>
40 </head>
41 <body>
42 <h1>
43 jQuery.holdReady Test
44 </h1>
45 <p>
46 This is a test page for jQuery.readyWait and jQuery.holdReady,
47 see
48 <a href="https://bugs.jquery.com/ticket/6781">trac-6781</a>
49 and
50 <a href="https://bugs.jquery.com/ticket/8803">trac-8803</a>.
51 </p>
52 <p>
53 Test for jQuery.holdReady, which can be used
54 by plugins and other scripts to indicate something
55 important to the page is still loading and needs
56 to block the DOM ready callbacks that are registered
57 with jQuery.
58 </p>
59 <p>
60 Script loaders are the most likely kind of script
61 to use jQuery.holdReady, but it could be used by
62 other things like a script that loads a CSS file
63 and wants to pause the DOM ready callbacks.
64 </p>
65 <p>
66 <strong>Expected Result</strong>: The text
67 <span id="expectedOutput">It Worked!</span>
68 appears below after about <strong>2 seconds.</strong>
69 </p>
70 <p>
71 If there is an error in the console,
72 or the text does not show up, then the test failed.
73 </p>
74 <div id="output"></div>
75 </body>
76 </html>