JSDeferred Test.

with(D()) {
Deferred.chain(
    function() { if (confirm('a')) return Deferred.wait(1); else throw "deny a"; },
    function() { if (confirm('b')) return Deferred.wait(1); else throw "deny b"; },
    function() { alert('c') },
    function error(msg) { alert(msg) }
);
}
changed April 29, 2010