• function

always can.Deferred.prototype.always

 

Add a callback to be unconditionally called.

deferred.always(alwaysCallback)

Parameters

  1. alwaysCallback {function()}

    A callback to be called whether the Deferred is resolved or rejected.

deferred.always( alwaysCallbacks ) adds handler(s) to be called when the Deferred object is either resolved or rejected.

var def = can.Deferred();
def.always( function(){
    //- Called whether the handler fails or is success.
});