Busy indicator API

Eric Shepherd eshepherd at mozilla.com
Thu Jul 9 22:22:52 UTC 2015


Jonas Sicking wrote:
> window.navigator.addBusyTask(promise);
>
> would be great. The API can be called any time and any number of
> times. The API would run the spinner until all provided promises are
> resolved. So if it's called twice with different promises, the spinner
> doesn't stop when one of the promises are resolved, but rather when
> the last promise is resolved.
I love this idea. It makes it possible for lots of apps to start a busy
indicator, but in reality, they're all sharing one spinner up at the top
of the screen, and that spinner keeps running until all promises are
resolved, at which point it goes away.

This is similar to how iOS does things, from a visual perspective.
There's one spinner indicator that appears in the status bar at the top
of the screen when any software is actively using the network. But this
API suggestion is a really elegant idea for implementing it.

-- 

Eric Shepherd
Senior Technical Writer
Mozilla <https://www.mozilla.org/>
Blog: http://www.bitstampede.com/
Twitter: http://twitter.com/sheppy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/firefox-dev/attachments/20150709/b56fabcf/attachment.html>


More information about the firefox-dev mailing list