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

Re: [battery] getBattery() vs. requestBattery() pattern

From: Marcos Caceres <w3c@marcosc.com>
Date: Wed, 2 Jul 2014 10:57:26 -0400
To: Domenic Denicola <domenic@domenicdenicola.com>
Cc: Rick Waldron <waldron.rick@gmail.com>, "public-device-apis@w3.org" <public-device-apis@w3.org>, Alex Russell <slightlyoff@google.com>
Message-ID: <AE8A4AB69AEB4422AE84F0E338EDF384@marcosc.com>


On Tuesday, July 1, 2014 at 5:23 PM, Domenic Denicola wrote:

> Right; in general we are pretty much done with infobar-style permission asks, as a platform. But we can still use the requestAccessToX().then(gotAccess, didntGetAccess) style even if getting access is not done as the result of an infobar. Perhaps you get access if you declare the need in a manifest, or if you're transported over HTTPS, or you get it by default but the user can toggle it off on a per-webpage basis. The user-facing API can still be uniform.


I agree, .requestWhatever() doesn't imply an info bar. Uniformity across APIs is good here. We are looking to use this pattern also in the  Screen Wake Lock  API. 

-- 
Marcos Caceres
Received on Wednesday, 2 July 2014 14:57:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:54:03 UTC