dojox.timing.doLater()

There are several tests running in the background - open the console to view.

dojox.timing.doLater() provides a simple mechanism that checks a conditional before allowing your function to continue. If the conditional is false, the function is blocked and continually re-called, with arguments, until the conditional passes.

dojox.timing.doLater() is designed to be used with one key statement (in bold):
var doThing = function(first, last){
if(dojox.timing.doLater(pseudoReadyThing)){return;}
doOther(first);
doMore(last);
}

Although these tests are using timers and incremnters, the idea behind dojox.timing.doLater() is to test for things like if a window is loaded, or if an XHR has returned.