mardi 25 août 2020

Permissions API for the web

In https://developer.mozilla.org/en-US/docs/Web/API/Permissions there is a Browser Support table indicate that some browser don't support Permissions API

Also as far as I understand , when a user reject permission request there is no way to request permission again

I need to create two functions checkPermission and grantPermission , these function return resolved promise when we have permission and rejected promise when not

  1. For the browser that don't support Permissions API , What must I do? If I return rejected promise may be NO PERMISSION IS REQUIRED FOR THAT BROWSER !! If I return resolved may be my app works wrong!
  2. Is there any library wrapped permission api?



Aucun commentaire:

Enregistrer un commentaire