funcunit
Version:
<!-- @hide title
20 lines (12 loc) • 377 B
Markdown
{*} can.List.prototype.reason
can.List.plugins.promise
{*} The reason the list's deferred was rejected. Read it via
[can.Map::attr attr].
## Use
var def = new can.Deferred();
var list = new can.List( def );
list.fail(function(){
list.attr("reason") //-> {message: "epic fail"}
});
def.reject({message: "epic fail"});