Re: [web-bluetooth] BluetoothDevice.gatt is not optional

> For requestDevice(), I'm tempted to specify that if you don't have 
any allowed services, then you get an error, instead of silently 
getting a useless device. Would that make sense?

Nope. Device won't get useless.
How about watching advertisements simply from a device?

```js
navigator.bluetooth.requestDevice({filters: [{name: "Jeffrey's 
Robot"}]})
  .then(device => {
    console.log('> Name:             ' + device.name);
    console.log('> Id:               ' + device.id);
    console.log('> Allowed Services: ' + device.uuids.join('\n' + ' 
'.repeat(20)));
    console.log('> Connected:        ' + device.gatt.connected);
    // Start watching advertisements...
    device.watchAdvertisements();
  })

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

Received on Friday, 2 September 2016 08:06:35 UTC