我们可以在 PWA 中询问所有移动权限

Sum*_*yak 3 progressive-web-apps

我想知道 PWA 在 Android Mobile 和 iOS Mobile 中可以获得的所有权限列表。

我知道以下权限:1. 相机 2. 推送通知

Fra*_*sco 5

Permission Registry:

'accelerometer', 
'accessibility-events', 
'ambient-light-sensor', 
'background-sync', 
'camera'?, 
'clipboard-read', 
'clipboard-write', 
'geolocation', 
'gyroscope', 
'magnetometer', 
'microphone', 
'midi',     
'notifications', 
'payment-handler', 
'persistent-storage'
'push'
Run Code Online (Sandbox Code Playgroud)

And you can query them with the permission.query() method to get the state of a user permission:

navigator.permissions.query(PermissionDescriptor)
    .then(
          function(permissionStatus) { ... }
         )
Run Code Online (Sandbox Code Playgroud)