Re: [web-bluetooth] Map to remove listing units

That's not idiomatic JS, it would be HEART_RATE then, and the .service
 is pretty weird but I suppose you can do that. It means allocating 
this service object for every context and creating a BluetoothService 
interface only for the purpose of constants. This thing is 
conceptually a map, you want a way to go from UUID -> Name, and from 
Name -> UUID. You probably also want a way to register new names? In 
either case you don't want navigator.bluetooth.uuids.{...}, constants 
shouldn't be on your instance.

I'd suggest navigator.bluetooth.requestDevice since that's talking to 
the browser's bluetooth system, just like the other device capability 
APIs. The object model for your system should just be interfaces on 
the window though, and you can put static constants there.

In general I'd encourage you to study the other device capability APIs
 and try to be consistent. :) 

-- 
GitHub Notif of comment by esprehn
See 
https://github.com/WebBluetoothCG/web-bluetooth/issues/49#issuecomment-97659988

Received on Thursday, 30 April 2015 04:31:55 UTC