- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
angular 2.0 promise design doc.pdf
AngularJS 2.0 Promise Design Doc
Status: Draft
Authors: Jeff Cross (crossj@)
Objective
AngularJS 2.0 needs promise support to build out the core libraries that make up AngularJS,
as well as to provide users of AngularJS with a default option for using promises with
AngularJS 2.0 apps.
ES6 Promises are now a first class citizen of the Web Platform, and are being implemented
in major browsers12 ! As such, there is less burden on frameworks to implement all the
underpinnings of promises. This document will explore the opportunity to provide APIs to
supplement the native implementation to improve developer experience and testing, and
will propose a detailed design to be implemented as part of AngularJS 2.0.
One challenge posed by having a native implementation of Promise is that the internal
mechanisms are now hidden from JavaScript, particularly the queueing and execution of
async microtasks, which presents some challenges to the way tests are written. This doc
will attempt to identify such issues, and propose solutions.
In addition to testing challenges, this doc will explore ways of making Promises more
enjoyable to use for end users by exploring different APIs.
1 /forum/#!forum/v8-users
2 /en-US/Firefox/Releases/25
Example ES6 Promise Implementation
function doneCounting(val) {
alert(Counted to + val);
return val;
}
function couldNotCount(reason) {
alert(Could not count);
return reason;
}
function resolver(resolve, reject) {
setTimeout(function doneCounting() {
resolve(5);
}, 5000);
}
var countToFive = new Promise(resolver);
countToFive.then(doneCounting, couldNotCount);
Requirements
As Native As Possible
In an ideal world, when developers need the control-flow semantics that promises provide,
they would use only the native Promise implementations found in JavaScript runtimes. This
design doc should aim
您可能关注的文档
- A Look under the Hood of CBO - the 10053 Event.pdf
- A LOV2 Domain-Based Optogenetic Tool.pdf
- A Matlab-Based Modeling and Simulation Package for Electric and Hybrid Electric Vehicle Design.pdf
- A Mid-nineteenth-century Discovery of the Non-Chinese World.pdf
- A model of structure relaxation in Glass.pdf
- A Multiple Model GM-PHD Filter for Maneuvering Target Tracking.doc
- a new active common mode emi filter for pwm inverter.pdf
- A New Alliance for Global Change.pdf
- a new attack on the filter generator.pdf
- A New Breed of Electric Machines - Basic Analysis and Applications of Dual.pdf
- 2025福建厦门市教育科学研究院附属小学招聘顶岗教师1人考试模拟试题及答案解析.docx
- 2025中国家用电器研究院校园招聘14人考试冲刺题库及答案解析.docx
- 2025中铝(云南)绿色先进铝基材料有限公司面向中铝股份内部招聘224人笔试冲刺试题及答案解析.docx
- 2025浙江湘旅会展有限公司世界旅游博览馆项目招聘9人考试备考题库最新.docx
- 2025江苏苏州大学附属儿童医院博士专项招聘20人考试参考题库推荐.docx
- 2025江苏南京航空航天大学金城学院招聘(后勤保卫处)考试备考题库推荐.docx
- 民法总则试题及答案解析.docx
- 中考政治热点试题及答案.docx
- 中考物理跳水试题及答案.docx
- 魔方文化素描试题及答案.docx
最近下载
- 足球比赛记录表(标准版).pdf VIP
- (正式版)B 4706.25-2008 家用和类似用途电器的安全 洗碗机的特殊要求.docx VIP
- ESD防护培训课件.pptx
- 2025高考历史上海卷真题试卷+参考答案.docx VIP
- 2022年辽宁农业职业技术学院单招语文题库及答案解析.pdf VIP
- 从乐道L90、理想i8两款新品预售,看下半年“大SUV”市场动向-2025-08-市场解读.pdf VIP
- 2024-2025学年山东省潍坊市寒亭区七年级(上)期末语文试卷(含详细答案解析).docx VIP
- 新22S2给水工程参考.docx VIP
- 大气课设-酸洗废气净化系统.pdf VIP
- 2023年黄山学院汉语言文学专业《现代汉语》期末试卷A(有答案).docx VIP
原创力文档


文档评论(0)