The bluetooth.js
script will add a navigator.bluetooth
attribute that behaves as specified
in the Web Bluetooth specification,
modulo bugs, incomplete features, and changes to the spec since the polyfill was implemented.
We provide an HTML file for use with HTML Imports as <link rel="import" href="bluetooth.html">
.
To use this polyfill, add a "bluetooth" section to your Chrome App manifest, listing the GATT Service UUIDs you want to use:
"bluetooth": {
"low_energy": true,
"uuids": [ "..." ]
}
Event bubbling and service change events aren't implemented.
Listen for the characteristicvaluechanged
event directly on navigator.bluetooth
.
Only the service UUID constants are defined.
navigator.bluetooth.requestDevice
extends RequestDeviceOptions
to include a connectForServices
boolean,
which selects between filtering on maybe only the advertised GATT services,
vs discovering all services on the device before filtering.