W3C home > Mailing lists > Public > public-device-apis@w3.org > July 2014

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

From: Rick Waldron <waldron.rick@gmail.com>
Date: Fri, 4 Jul 2014 17:23:12 -0400
Message-ID: <CAHfnhfrEx95ka3yL0fVatzNNxPN4eXc-dC_=ebVzpU6LSKy6xQ@mail.gmail.com>
To: Marcos <marcos@marcosc.com>
Cc: Tim Volodine <timvolodine@google.com>, Domenic Denicola <domenic@domenicdenicola.com>, Mounir Lamouri <mounir@lamouri.fr>, public-device-apis <public-device-apis@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:33:10 UTC