Open inexorabletash opened 6 years ago
With the updated API shape (see #5):
~permission not granted; event listener added; permission granted - do events start?~ - n/a, since you can't add a listener if the permission wasn't granted since you don't get the State object
permission granted; event listener added; permission revoked - do events stop? - answer should be: yes
~permission not granted; event listener added; permission granted; permission revoked~ n/a
permission granted; event listener added; permission revoked; permission granted - do events resume? - ???
We've updated the shape of the API again. The start()
method resolves only if permission is granted.
In the Geolocation API calls to the success callback will start after permission is granted and stop temporarily while permission is denied. This API also provides an error callback which will be notified of the permission denied event. The callback style is outdated however the Generic Sensor API provides both reading
and error
events but does not resume events when permission is re-granted.
Cases: