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
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to