BluetoothRemoteGATTCharacteristic: startNotifications() 方法

可用性有限

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

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

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

BluetoothRemoteGATTCharacteristic.startNotifications() 方法在 BluetoothRemoteGATTCharacteristic 例項上存在活動通知時,它會返回一個指向該例項的 Promise

語法

js
startNotifications()

引數

無。

返回值

一個指向 BluetoothRemoteGATTCharacteristic 例項的 Promise

規範

規範
Web 藍牙
# dom-bluetoothremotegattcharacteristic-startnotifications

瀏覽器相容性