BluetoothRemoteGATTCharacteristic: getDescriptors() 方法

可用性有限

此特性不是基線特性,因為它在一些最廣泛使用的瀏覽器中不起作用。

實驗性: 這是一項實驗性技術
在生產中使用此技術之前,請仔細檢查瀏覽器相容性表格

安全上下文: 此功能僅在安全上下文(HTTPS)中可用,且支援此功能的瀏覽器數量有限。

BluetoothRemoteGATTCharacteristic.getDescriptors() 方法返回一個 Promise,該 Promise 會解析為一個 Array,其中包含給定描述符 UUID 的所有 BluetoothRemoteGATTDescriptor 物件。

語法

js
getDescriptors(bluetoothDescriptorUUID)

引數

無。

返回值

一個 Promise,它會解析為一個 Array,其中包含 BluetoothRemoteGATTDescriptor 物件。

規範

規範
Web 藍牙
# dom-bluetoothremotegattcharacteristic-getdescriptors

瀏覽器相容性