ISSUE-166: Should getBattery() always return the same promise?

Should getBattery() always return the same promise?

State:
PENDING REVIEW
Product:
Battery Status API
Raised by:
Mounir Lamouri
Opened on:
2014-08-04
Description:
http://lists.w3.org/Archives/Public/public-device-apis/2014Jul/0003.html

[[

Hi,

When I wrote the getBattery() prose, I made it so that getBattery()
would return a new promise every time it is called but it would always
return the same BatteryManager when the promise is resolved.

I realised that this requirement probably doesn't make much sense and we
might want to spec getBattery() as returning always the same promise. In
other words, navigator.getBattery() === navigator.getBattery(). The
intent isn't really to get the equality but that way, we simplify the
implementation because implementing this only require to keep track of
that one promise.

WDYT?


]]
Related Actions Items:
Related emails:
  1. [minutes] draft minutes from DAP 2014-08-21 call (from w3c@fjhirsch.com on 2014-08-21)
  2. [admin] Agenda - DAP Distributed Meeting 21 August 2014 (from w3c@fjhirsch.com on 2014-08-19)
  3. Re: DAP-ISSUE-166: Should getBattery() always return the same promise? (from anssi.kostiainen@intel.com on 2014-08-18)
  4. RE: DAP-ISSUE-166: Should getBattery() always return the same promise? (from cathy.chan@nokia.com on 2014-08-11)
  5. Re: DAP-ISSUE-166: Should getBattery() always return the same promise? (from w3c@fjhirsch.com on 2014-08-11)
  6. RE: DAP-ISSUE-166: Should getBattery() always return the same promise? (from cathy.chan@nokia.com on 2014-08-11)
  7. Re: DAP-ISSUE-169: Battery API needs to be more event driven and async, less device centric. [Battery Status API] (from anssi.kostiainen@intel.com on 2014-08-11)
  8. Re: DAP-ISSUE-166: Should getBattery() always return the same promise? (from anssi.kostiainen@intel.com on 2014-08-11)
  9. dap commit: Make getBattery() always return the same promise (addresses ISSUE-166). (from cvsmail@w3.org on 2014-08-11)
  10. Re: DAP-ISSUE-166: Should getBattery() always return the same promise? (from mounir@lamouri.fr on 2014-08-08)
  11. Re: DAP-ISSUE-166: Should getBattery() always return the same promise? (from anssi.kostiainen@intel.com on 2014-08-08)
  12. draft minutes from today's teleconference, 7 Aug 2014 (from w3c@fjhirsch.com on 2014-08-07)
  13. [admin] Agenda - DAP Distributed Meeting 7 August 2014 (from w3c@fjhirsch.com on 2014-08-04)
  14. [battery] Battery Issue summary and status (from w3c@fjhirsch.com on 2014-08-04)
  15. DAP-ISSUE-166: Should getBattery() always return the same promise? (from sysbot+tracker@w3.org on 2014-08-04)

Related notes:

+1 http://lists.w3.org/Archives/Public/public-device-apis/2014Jul/0006.html

Frederick Hirsch, 4 Aug 2014, 19:30:41

See related issue, ISSUE-167: "Should Promises be used in Battery API"

https://www.w3.org/2009/dap/track/issues/167

Frederick Hirsch, 4 Aug 2014, 19:33:56

Resolved with https://dvcs.w3.org/hg/dap/rev/27d83813c582

Frederick Hirsch, 11 Aug 2014, 19:40:50

Display change log ATOM feed


Anssi Kostiainen <anssi.kostiainen@intel.com>, Reilly Grant <reillyg@google.com>, Chairs, Fuqiao Xue <xfq@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: index.php,v 1.326 2018/10/13 17:29:51 vivien Exp $