resolveWith

  • function
can.Deferred.prototype.resolveWith  

Resolve a Deferred in a particular context.

deferred.resolveWith(context[, arguments])

Parameters

  1. context {Object}

    Context passed to the doneCallbacks as the this object.

  2. arguments {Object}Optional

    Array of arguments that are passed to the doneCallbacks.

deferred.resolveWith(context, arguments) resolves a Deferred and calls the doneCallbacks with the given arguments.

var def = can.Deferred();
def.resolveWith(this, { animals: [ 'cows', 'monkey', 'panda' ] })