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

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

From: Device APIs Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Mon, 04 Aug 2014 19:30:01 +0000
Message-Id: <E1XENxJ-0002xm-Gp@shauna.w3.org>
To: public-device-apis@w3.org
DAP-ISSUE-166: Should getBattery() always return the same promise?

http://www.w3.org/2009/dap/track/issues/166

Raised by: Mounir Lamouri
On product: 

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?


]]
Received on Monday, 4 August 2014 19:30:03 UTC

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