摘要:
The following is the core concept to javascript Asychnoous Promise Pattern, you can extend it a little bit to realize the starndard API: .when(),.then(),.resolved(),.reject()This is just a mock.function Ajax(promise){ var result=promise||{}; setTimeout(function(){ result.id="_id"; },5000); 阅读全文