会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
代码改变世界
Cnblogs
Dashboard
Login
Home
Contact
Gallery
Subscribe
RSS
当耐特
随笔档案-2013年02月
码农干货系列【6】--javascript异步编程之:世界上最短的Promise库
2013-02-24 21:12 by 【当耐特】, 6637 阅读,
收藏
,
摘要: 类库源码 var Promise = function () { this.thens = []; }; Promise.prototype = { resolve: function () { var t = this.thens.shift(), n; t && (n = t.apply(null, ...
阅读全文
13 Comment
About