Re: [web-bluetooth] When a device causes a page to open, the page should be able to find the device

If we go down the Permissions API road 
(https://lists.w3.org/Archives/Public/public-web-bluetooth/2015Dec/0007.html),
 it would be as simple as adding a `referringDevice` key to the 
Permission object.

```js       
permissions.query({ name: 'bluetooth' })
.then(permission => {
  if (permission.state != 'granted') {
    console.log('User has forbidden websites to use bluetooth...');
    return;
  }
  if (permission.referringDevice) {
    // Let's try to connect to the Physical Web object first. 
    return connectDevice(permission.referringDevice);
  }
  ...

-- 
GitHub Notification of comment by beaufortfrancois
Please view or discuss this issue at 
https://github.com/WebBluetoothCG/web-bluetooth/issues/163#issuecomment-169300837
 using your GitHub account

Received on Wednesday, 6 January 2016 11:18:24 UTC