Re: Busy indicator API

2015-07-13 Thread Richard Barnes
On Sun, Jul 5, 2015 at 5:11 PM, Anne van Kesteren ann...@annevk.nl wrote: A while back there have been some requests from developers (seconded by those working on GitHub) to have an API to indicate whether a site is busy with one thing or another (e.g. networking). They'd like to use this to

Re: Busy indicator API

2015-07-13 Thread Adam Roach
On 7/13/15 10:36, smaug wrote: On 07/13/2015 01:50 PM, Richard Barnes wrote: Obligatory: Will this be restricted to secure contexts? But given that web pages can already achieve something like this using document.open()/close(), at least on Gecko, perhaps exposing the API to

Re: Busy indicator API

2015-07-13 Thread smaug
On 07/13/2015 01:50 PM, Richard Barnes wrote: On Sun, Jul 5, 2015 at 5:11 PM, Anne van Kesteren ann...@annevk.nl wrote: A while back there have been some requests from developers (seconded by those working on GitHub) to have an API to indicate whether a site is busy with one thing or another

Re: Busy indicator API

2015-07-09 Thread Eric Shepherd
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

Re: Busy indicator API

2015-07-06 Thread Anne van Kesteren
On Mon, Jul 6, 2015 at 3:22 AM, Mike Connor mcon...@mozilla.com wrote: Anne, I assume the point is not to draw attention to background tabs. There are much more useful ways to do that, if they're going to ask for a new API/UI. Instead, my read is that they're looking for a hopefully-not-janky

Re: Busy indicator API

2015-07-06 Thread Robin Berjon
On 06/07/2015 03:22 , Mike Connor wrote: Does it need to be an API, or would dispatching an event be sufficient? Something like busy and idle events would be easy to send from JS, and UAs would be free to honour or ignore based on context. On the face of it it's certainly useful: writing your

Re: Busy indicator API

2015-07-06 Thread Jonas Sicking
I think an API like: 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

Busy indicator API

2015-07-05 Thread Anne van Kesteren
A while back there have been some requests from developers (seconded by those working on GitHub) to have an API to indicate whether a site is busy with one thing or another (e.g. networking). They'd like to use this to avoid having to create their own UI. In Firefox this could manifest itself by

Re: Busy indicator API

2015-07-05 Thread Anne van Kesteren
On Sun, Jul 5, 2015 at 6:21 PM, fantasai fantasai.li...@inkedblade.net wrote: On 07/05/2015 11:11 AM, Anne van Kesteren wrote: A while back there have been some requests from developers (seconded by those working on GitHub) to have an API to indicate whether a site is busy with one thing or

Re: Busy indicator API

2015-07-05 Thread Dirkjan Ochtman
On Sun, Jul 5, 2015 at 5:11 PM, Anne van Kesteren ann...@annevk.nl wrote: Is there a reason we shouldn't expose a hook for this? On the one hand, this seems really useful. On the other hand, I'm pretty worried about the UX implications here. I wouldn't want a dozen flashing/spinning/moving

Re: Busy indicator API

2015-07-05 Thread fantasai
On 07/05/2015 11:11 AM, Anne van Kesteren wrote: A while back there have been some requests from developers (seconded by those working on GitHub) to have an API to indicate whether a site is busy with one thing or another (e.g. networking). They'd like to use this to avoid having to create

Re: Busy indicator API

2015-07-05 Thread smaug
On 07/05/2015 06:11 PM, Anne van Kesteren wrote: A while back there have been some requests from developers (seconded by those working on GitHub) to have an API to indicate whether a site is busy with one thing or another (e.g. networking). They'd like to use this to avoid having to create

Re: Busy indicator API

2015-07-05 Thread Mike Connor
On 5 July 2015 at 11:53, Dirkjan Ochtman dirk...@ochtman.nl wrote: On Sun, Jul 5, 2015 at 5:11 PM, Anne van Kesteren ann...@annevk.nl wrote: Is there a reason we shouldn't expose a hook for this? On the one hand, this seems really useful. On the other hand, I'm pretty worried about the UX