The Web Bluetooth
API lets websites discover and communicate with devices over the
Bluetooth 4 wireless standard using the Generic Attribute Profile (GATT). It is
currently partially implemented in Android M, Chrome OS, Mac, and Windows 10.
This sample illustrates the use of the Web Bluetooth API to retrieve battery
information from a nearby Bluetooth Device advertising Battery information with
Bluetooth Low Energy. You may want to try this demo with the BLE Peripheral
Simulator App from the Google
Play Store and check out the Battery Level (Promises) sample.