On Jun 24, 2010, at 21:00 , Doug Turner wrote:
> On Jun 24, 2010, at 11:48 AM, John Gregg wrote:
>> interface Permissions {
>> 
>> // permission values
>> const unsigned long PERMISSION_ALLOWED = 0;
>> const unsigned long PERMISSION_UNKNOWN = 1;
>> const unsigned long PERMISSION_DENIED  = 2;

Small nit, but can we have string constants instead ("allowed", "denied", 
"unknown")? They usually turn out to either be less typing or more readable 
depending on whether one uses "Permissions.PERMISSION_ALLOWED" or "1".

> so, checkPermission and requestPermission.  I am happy with that......

+1

> navigator.permissions.requestPermission("geolocation,desktop-notification",...).

I'd make it an array ["geolocation", "notifications"] but yeah.

>> The bigger question is, are other features interested?  Would the 
>> Geolocation spec consider using something like this for permissions?
> 
> cc'ing Andrei Popescu - the editor of the Geolocation spec.  Not sure how to 
> formally answer your question.  However, if the permission api above was 
> implemented, I think it naturally follows that "geolocation" would be one of 
> the known strings.

DAP would be interested. To talk process a little bit: if we want to make this 
into a spec it needs a home. In case WebApps can't or won't take it (given how 
complicated rechartering it already is), DAP seem like a natural home for it. 
I'd have to ask the group of course but I'm in favour.

-- 
Robin Berjon - http://berjon.com/




Reply via email to