Re: [battery] Should getBattery() always return the same promise?

On Fri, Jul 4, 2014 at 5:07 PM, Marcos <marcos@marcosc.com> wrote:

>
>
> On July 4, 2014 at 3:27:41 PM, Domenic Denicola (
> domenic@domenicdenicola.com) wrote:
> > > Rick, Chromium has a multi-process architecture, whereas
> > Firefox in general keeps most things in a single process. Thus
> > Firefox has the ability to implement many more things synchronously
> > than Chromium does. Implementation experience based on a single
> > vendor is not terribly valuable in guiding API surface, especially
> > in questions of sync vs. async, and especially when that vendor
> > is Firefox (the only single-process modern browser, from what
> > I understand).
>
> Can't we just add `readonly attribute Promise isReady` (yes, we can
> bikeshed) to the current interface? That should can serve as a signal
> without needing to change the existing API (and can continue to work as it
> does today in Gecko without needing the API to be refactored).
>
> so:
>
> navigator.battery.isReady.then(doFunThings)
>
>
No, I don't want to be part of the discussion that lead to a boolean-ish
named thing that returns a promise.

Rick

Received on Friday, 4 July 2014 21:23:59 UTC