can.List.prototype.state

  • property

{String}

 

String

The state of the list's promise. Read it via attr. It will be one of the following:

  • undefined - the list does not have a deferred
  • "pending" - the list's promise is pending
  • "resolved" - the list's promise was resolved
  • "rejected" - the list's promise was rejected

Use

var def = new can.Deferred();
var list = new can.List( def );

list.attr('state') //-> "pending"