Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are progressCallbacks useful?

Tags:

jquery

A Deferred object has the callback pools doneCallbacks, failCallbacks and progressCallbacks.

Both doneCallbacks and failCallbacks (together with the methods done, fail, always, reject, resolve, etc.) are useful.

What is a typical use case for progressCallbacks?

like image 510
Randomblue Avatar asked Aug 23 '26 03:08

Randomblue


1 Answers

According to http://bugs.jquery.com/ticket/9398, it's offers progressive notifications. This is handy when dealing with long asynchronous tasks such as xhr2 uploads. So yes, as Guillaume86 suggests, it could be used in conjunction with a progress indicator such as a progressbar.

like image 81
Micah Avatar answered Aug 25 '26 19:08

Micah



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!