Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (27 sloc) 0.805 kB
<p>
One second request, though requested second, should return before the 3 second request.<br />
<small>(Might not work in Opera because they do not support the async attribute at the moment)</small>
</p>
<button id="fetch">fetch!</button>
<hr/>
<pre id="returned"></pre>
<script src="/depender/build?require=More/Request.JSONP,Core/Element.Event"></script>
<script>
var returned = document.id('returned');
$('fetch').addEvent('click', function(){
new Request.JSONP({
url: '/echo/jsonp/',
data: {delay: 3},
onComplete: function(){
returned.appendText('Three second request returned.\n');
}
}).send();
new Request.JSONP({
url: '/echo/jsonp/',
data: {delay: 1},
onComplete: function(data){
returned.appendText('One second request returned.\n');
}
}).send();
});
</script>
Jump to Line
Something went wrong with that request. Please try again.