Promise represents the result of a task, which may or may not have completed! Read more from Bryan Klimt's blog: http://blog.parse.com/2013/01/29/whats-so-great-about-javascript-promises/My Code References
Monday, August 19, 2013
A JavaScript Promise
A JavaScript
Friday, February 15, 2013
Saturday, February 9, 2013
Wednesday, February 6, 2013
Tuesday, February 5, 2013
Dojo's loader can load non-amd scripts
Question (Thanks to Raymond Wadkins) on Dojo's loader loading non-amd scripts:
If the parser auto-requires modules, it will always behave in a promise fashion
From the API documentation for Dojo/Parser:
If the
parser auto-requires modules, it will always behave in a promise fashion and
parser.parse().then(function(instances){...}) should
be used.Dojo Auto Require
As of Dojo 1.8, the parser supports auto require. If as the document is being
parsed any of the constructors are missing in either data-dojo-type or data-dojo-mixins and
that class name looks like a MID (e.g. contains a slash), the parser will
attempt to require in those modules after it has finished scanning the DOM. This
means that you do not explicitly have to require in classes in your declarative
markup before the parser is invoked.
Subscribe to:
Comments (Atom)