摘要: 构造函数 构造函数接受一个函数(executor)作为参数,该函数在返回 Promise 实例之前被调用。函数的两个参数分别是 resolve 和 reject 函数。 如果 executor 函数执行中抛出异常,则 Promise 视为 rejected。 executor 函数返回值没有意义。 阅读全文
posted @ 2016-11-18 14:46 iFantasticMe 阅读(2318) 评论(0) 推荐(0) 编辑