Re: [web-bluetooth] Say what to do when the system has no Bluetooth adapter or it's off.

Roughly. I'm not sure of the name of the getter and member, and 
whether we can have people use `Object.observe()` on the member 
instead of the `onchange` event. I believe we can forbid the platform 
from rejecting the resulting promise (just return `false` if the 
user's forbidden access). So we might wind up with:

.then(adapterInfo => {
  // adapterInfo.value will be kept up-to-date by the UA as long as 
the availability
  // object is alive. It is advised for web developers to discard the 
object as soon 
  // as it's not needed.
  Object.observe(adapterInfo, () => {


navigator.bluetooth.getAvailability().then(availability => 

`getAvailability()` extends to a future where we might give explicit 
access to particular adapters, or tell developers whether BT is 
disabled, or whatever. `hasAdapter()` is more targeted, which avoids 
getting hopes up, and lets us optimize more for the specific 
information the developers are getting.

GitHub Notif of comment by jyasskin

Received on Tuesday, 21 July 2015 18:57:09 UTC