Re: revoking permission after granting permission

On Thu, 10 Nov 2011 14:51:35 +0100, Steve Block <steveblock@google.com>  
wrote:

>>> That is already the case.
>> Not if the user first allows and then changes his mind and denies.
>
> The spec certainly intends to stipulate at most one callback. As I
> mentioned, the algorithm in the spec has no concept of permission
> 'state', only of requesting permission from the user, so there can be
> no 'change of mind' for a single call to getCurrentPosition() or
> watchPosition(). If you think the spec needs clarification, please
> propose some improved wording.

In Opera, the user can change his mind. (Firefox also has UI to change the  
permission to deny, although I haven't tested its behavior.)

I think the spec should be changed to allow UAs to allow users to change  
their minds, and when they change to deny, the behavior should be as  
follows:

For getCurrentPosition, if no callback has been invoked yet, invoke the  
error callback with PERMISSION_DENIED and stop the algorithm (don't invoke  
success). If success has already been invoked, do nothing.

For watchPosition, if the algorithm is running, invoke the error callback  
with PERMISSION_DENIED and stop the algorithm.

HTH
-- 
Simon Pieters
Opera Software

Received on Thursday, 10 November 2011 14:07:24 UTC