General Interface is an open source project hosted by the Dojo Foundation

Calling Asynchronous Functions

compared with
Current by Barbara Weinstein
on Mar 04, 2010 08:33.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (2)

View Page History


This can eliminate a call to {{when()}} and an anonymous function, thereby improving code readability and conciseness. {code:lang=javascript}var getURL = jsx3.$Y(function(cb) {
cb.done("data.xml");
});
});{code}

The previous code is equivalent to but more concise than the following code. {code:lang=javascript}var getURL = jsx3.$Y(function(cb) {
cb.done("data.xml");
});