jquery/test/data/readywait.html
Michał Gołębiowski-Owczarek 95e34b6955
Docs: Replace #NUMBER Trac issue references with trac-NUMBER
This is a version of gh-4993 for the `3.x-stable` branch.

The GitHub UI treats `#NUMBER` as referring to its own issues which is confusing
when in jQuery source it's usually referring to the old deprecated Trac instance
at https://bugs.jquery.com. This change replaces all such Trac references with
`trac-NUMBER`.

A few of the references came with the Sizzle integration and referred to the
Sizzle GitHub bug tracker. Those have been replaced with full links instead.

A new entry describing issue reference conventions has been added to README.

Closes gh-4994
Ref gh-4993
Ref 5d5ea01511
2022-01-12 23:23:10 +01:00

77 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html>
<!--
Test for jQuery.holdReady. Needs to be a
standalone test since it deals with DOM
ready.
-->
<head>
<title>
jQuery.holdReady Test
</title>
<style>
div { margin-top: 10px; }
#output { background-color: green }
#expectedOutput { background-color: green }
</style>
<script src="../jquery.js"></script>
<script src="./iframeTest.js"></script>
<!-- Load the script loader that uses
jQuery.readyWait -->
<script type="text/javascript">
(function() {
var released = false;
// Hold on jQuery!
jQuery.holdReady( true );
setTimeout( function() {
released = true;
jQuery.holdReady( false );
}, 300 );
jQuery(function() {
jQuery( "#output" ).text( "Ready called, holdReady released: " + released );
startIframeTest( released );
});
})();
</script>
</head>
<body>
<h1>
jQuery.holdReady Test
</h1>
<p>
This is a test page for jQuery.readyWait and jQuery.holdReady,
see
<a href="https://bugs.jquery.com/ticket/6781">trac-6781</a>
and
<a href="https://bugs.jquery.com/ticket/8803">trac-8803</a>.
</p>
<p>
Test for jQuery.holdReady, which can be used
by plugins and other scripts to indicate something
important to the page is still loading and needs
to block the DOM ready callbacks that are registered
with jQuery.
</p>
<p>
Script loaders are the most likely kind of script
to use jQuery.holdReady, but it could be used by
other things like a script that loads a CSS file
and wants to pause the DOM ready callbacks.
</p>
<p>
<strong>Expected Result</strong>: The text
<span id="expectedOutput">It Worked!</span>
appears below after about <strong>2 seconds.</strong>
</p>
<p>
If there is an error in the console,
or the text does not show up, then the test failed.
</p>
<div id="output"></div>
</body>
</html>