W3C home > Mailing lists > Public > public-geolocation@w3.org > November 2011

revoking permission after granting permission

From: Simon Pieters <simonp@opera.com>
Date: Mon, 07 Nov 2011 10:41:38 +0100
To: public-geolocation@w3.org
Message-ID: <op.v4kk7ocvidj3kv@simon-pieterss-macbook.local>
Hi

The geolocation spec says

"For both getCurrentPosition and watchPosition ... If the user denies  
permission, the errorCallback (if present) must be invoked with code  
PERMISSION_DENIED, irrespective of any other errors encountered in the  
above steps."

So if the user first grants permission, but then later denies permission,  
the spec requires the error callback to be invoked, for both  
getCurrentPosition and watchPosition. It doesn't say anything about  
stopping watchPosition if permission is denied after it having been  
granted.

I think getCurrentPosition should only invoke at most one callback, either  
success or error.

I think watchPosition should be aborted if the user revokes permission,  
and should invoke the error callback with PERMISSION_DENIED in that case.

-- 
Simon Pieters
Opera Software
Received on Monday, 7 November 2011 09:40:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 March 2012 18:13:56 GMT