- From: François Beaufort via GitHub <sysbot+gh@w3.org>
- Date: Fri, 05 Aug 2016 07:05:26 +0000
- To: public-web-bluetooth-log@w3.org
For the sake of completeness, is this how it would work? ```js navigator.permissions.query({ name: "bluetooth", deviceId: sessionStorage.lastDevice /* because we've stored it previously */ }).then(result => { result.addEventListener('change', function(event) { // Permission status has changed for this device console.log(event.target); }) }) ``` If `result.devices` were to return multiple devices, would there be multiple events fired for each device? Is this how do I access a newly paired `BluetoothDevice` object with this `change` triggered event? ```js navigator.permissions.query({ name: "bluetooth", optionalServices: [ 'battery_service' ], }).then(result => { result.addEventListener('change', function(event) { console.log(event.target); /* Is this BluetoothDevice? }) }) ``` @jyasskin Sorry for this, I'm still having hard time getting the full `Permissions` API scope for Web Bluetooth. -- GitHub Notification of comment by beaufortfrancois Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/257#issuecomment-237772455 using your GitHub account
Received on Friday, 5 August 2016 07:07:30 UTC