From the $.when
[docs] documentation:
If a single Deferred is passed to jQuery.when
, its Promise object (a subset of the Deferred methods) is returned by the method.
So $.when(deferred).then(...)
is the same as deferred.promise().then(...)
.
The promise object is just a limited interface to the deferred object. It allows to add callbacks, but not to change the state of the Deferred (resolve, reject it).
So conclusively, there is basically no difference between using $.when
and calling .then
directly on the deferred object.
I don't think it makes sense to pass a single deferred object explicitly to $.when
, since you don't get any advantage. However, there might be situations where you have an unknown number of deferred objects, which means it could also be only one.