[web-bluetooth] Code example malformed.

carybran has just created a new issue for 
https://github.com/WebBluetoothCG/web-bluetooth:

== Code example malformed. ==
Hi - tested this with U2F work we are doing and was able to 
successfully see the authenticator!

Found issue in documentation with the request device call:

navigator.bluetooth.requestDevice({
  filters: [{
    services: [0x1234, 0x12345678, 
'99999999-0000-1000-8000-00805f9b34fb'],
  }]
.then(device => {...})
.catch(error => { console.log(error); });

Should be:

navigator.bluetooth.requestDevice({
  filters: [{
    services: [0x1234, 0x12345678, 
'99999999-0000-1000-8000-00805f9b34fb'],
  }]})  <===== ADDED closing braces
.then(device => {...})
.catch(error => { console.log(error); });

See https://github.com/WebBluetoothCG/web-bluetooth/issues/145

Received on Friday, 24 July 2015 20:12:38 UTC