We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Reviewer,
For the following code at the link http://learn.jquery.com/code-organization/deferreds/examples/, it is not very clear how defer.resolve and defer.reject work in the function passed to the $.Deferred() method.
Thank you for reading the issue.
var cachedScriptPromises = {}; $.cachedGetScript = function( url, callback ) { if ( !cachedScriptPromises[ url ] ) { cachedScriptPromises[ url ] = $.Deferred(function( defer ) { $.getScript( url ).then( defer.resolve, defer.reject ); }).promise(); } return cachedScriptPromises[ url ].done( callback ); };
The text was updated successfully, but these errors were encountered:
Note what defer.resolve and defer.reject do. Closes jquerygh-693
c23aca0
d08015a
I forgot my suggestion.
Thank you for your email.
From: Karl Swedberg [mailto:notifications@github.com] Sent: Sunday, March 13, 2016 5:39 PM To: jquery/learn.jquery.com Cc: JIN, ZHEMING Subject: Re: [learn.jquery.com] Deferred example suggestion (#693)
Closed #693#693 via d08015ahttps://github.com/jquery/learn.jquery.com/commit/d08015a310858e480c746c7e145303be1aba500e.
— Reply to this email directly or view it on GitHubhttps://github.com//issues/693#event-588019391.
Sorry, something went wrong.
Note what defer.resolve and defer.reject do. Closes gh-693
64ff75e
No branches or pull requests
Hi Reviewer,
For the following code at the link http://learn.jquery.com/code-organization/deferreds/examples/,
it is not very clear how defer.resolve and defer.reject work in the function passed to the $.Deferred() method.
Thank you for reading the issue.
The text was updated successfully, but these errors were encountered: