BluetoothRemoteGATTService: phương thức getCharacteristic()
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Phương thức BluetoothGATTService.getCharacteristic() trả về một Promise tới một thể hiện của BluetoothRemoteGATTCharacteristic cho một mã định danh duy nhất toàn cục (UUID) đã cho.
Cú pháp
js
getCharacteristic(characteristic)
Tham số
characteristic-
UUID của một đặc tính, ví dụ
'00002a37-0000-1000-8000-00805f9b34fb'cho đặc tính Heart Rate Measurement.
Giá trị trả về
Một Promise tới một thể hiện của BluetoothRemoteGATTCharacteristic.
Thông số kỹ thuật
| Specification |
|---|
| Web Bluetooth> # dom-bluetoothremotegattservice-getcharacteristic> |