jquery/jquery-ui — pull request #901 by jdudek (2013-01-29 17:29:21+00:00)
Title: Autocomplete: allow promise object to be returned by source function

If the function passed as the 'source' option returns a promise, bind
result as 'done' callback and handle failure automatically.

This simplifies using custom XHR requests for source, for example:

$("#autocomplete").autocomplete({
source: function (request) {
return $.get('/suggestions', { term: request.term }).pipe(makeResults);
}
});