BluetoothRemoteGATTService: getCharacteristic() method
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
TheBluetoothGATTService.getCharacteristic() methodreturns aPromise to an instance ofBluetoothRemoteGATTCharacteristic for a given universally unique identifier(UUID).
In this article
Syntax
js
getCharacteristic(characteristic)Parameters
characteristicThe UUID of a characteristic, forexample
'00002a37-0000-1000-8000-00805f9b34fb'for the Heart RateMeasurement characteristic.
Return value
APromise to an instance ofBluetoothRemoteGATTCharacteristic
Specifications
| Specification |
|---|
| Web Bluetooth> # dom-bluetoothremotegattservice-getcharacteristic> |