WICG / idle-detection

A proposal for an idle detection and notification API for the web
Other
68 stars 22 forks source link

Define observation behavior when permission is revoked/granted #3

Open inexorabletash opened 6 years ago

inexorabletash commented 6 years ago

Cases:

inexorabletash commented 6 years ago

With the updated API shape (see #5):

reillyeon commented 4 years ago

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.