Navigator.permissions.revoke is not a function

Viewed 2257

I use HTML5 Geolocation to get user coordinates. But if the user does not agree to request access to GeoLocation, this will always be a problem when visiting the site.

I want to get access again when the user has been denied access.

I used the following:

https://developer.mozilla.org/en-US/docs/Web/API/Permissions/revoke

https://codelabs.developers.google.com/codelabs/permissions-introduction/index.html?index=..%2F..index#8

My code:

  function revokePermission() {
  navigator.permissions.revoke({name:'geolocation'}).then(function(result) {
    report(result.state);
  });
}

I get this error:

navigator.permissions.revoke is not a function

Thank you for helping

0 Answers
Related