此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

BluetoothRemoteGATTCharacteristic:getDescriptor() 方法

有限可用

此特性不属于基线,因为它尚未在主流浏览器中得到支持。

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

安全上下文: 此特性仅在一些支持的浏览器的安全上下文(HTTPS)中可用。

BluetoothRemoteGATTCharacteristic.getDescriptor() 方法返回一个将会兑现为第一个具有给定描述符 UUID 的 BluetoothRemoteGATTDescriptor 的 Promise。

语法

js
getDescriptor(bluetoothDescriptorUUID)

参数

无。

返回值

Promise,将会兑现为第一个满足要求的 BluetoothRemoteGATTDescriptor。

规范

规范
WebBluetooth
# dom-bluetoothremotegattcharacteristic-getdescriptor

浏览器兼容性