BluetoothRemoteGATTCharacteristic: getDescriptors() 方法

可用性有限

此特性不是基线特性,因为它在一些最广泛使用的浏览器中不起作用。

实验性: 这是一项实验性技术
在生产中使用此技术之前,请仔细检查浏览器兼容性表格

安全上下文: 此功能仅在安全上下文(HTTPS)中可用,且支持此功能的浏览器数量有限。

BluetoothRemoteGATTCharacteristic.getDescriptors() 方法返回一个 Promise,该 Promise 会解析为一个 Array,其中包含给定描述符 UUID 的所有 BluetoothRemoteGATTDescriptor 对象。

语法

js
getDescriptors(bluetoothDescriptorUUID)

参数

无。

返回值

一个 Promise,它会解析为一个 Array,其中包含 BluetoothRemoteGATTDescriptor 对象。

规范

规范
Web 蓝牙
# dom-bluetoothremotegattcharacteristic-getdescriptors

浏览器兼容性