always

  • function
can.Deferred.prototype.always  

Add one or more callbacks to be unconditionally called when a Deferred is resolved or rejected.

deferred.always(alwaysCallbacks)

Parameters

  1. alwaysCallbacks {function() | Array}

    A function, or an array of functions, to be called whether the Deferred is resolved or rejected.

deferred.always(alwaysCallbacks) adds one or more functions 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.
});