- From: François Beaufort 🇫🇷 <fbeaufort@google.com>
- Date: Fri, 18 Dec 2015 17:52:15 +0100
- To: public-web-bluetooth <public-web-bluetooth@w3.org>
I've been thinking about the Permissions API, wrote a short proposal
at https://gist.github.com/beaufortfrancois/951fc384e87a786a6d35 and
would love your take on it.
The Permissions API is there to provide a unified and consistent way
to ask for permissions on the Web and I *really* think we should think
about how to incorporate the Web Bluetooth API and the upcoming
chooser APIs such as Web USB.
Thanks to permissions.query({ name: 'bluetooth' }), a website would be
able to tell if a user has already disabled the Bluetooth Content
Setting and provide an appropriate UX.
Using permissions.request makes much more sense semantically when you
think about it.
Replacing navigator.bluetooth.getDevices() with permissions.query({
name: 'bluetooth' }) is also nice as it's quite customisable and we
can also add a deviceId option to filter this list in a "Restore"
situation.
The cherry on top is obviously the permission.referringDevice
BluetoothDevice object which comes there for free.
Received on Friday, 18 December 2015 16:52:45 UTC