BluetoothRemoteGATTCharacteristic: writeValue() 方法

已棄用:此特性不再推薦。雖然某些瀏覽器可能仍然支援它,但它可能已經從相關的網路標準中刪除,可能正在刪除過程中,或者可能僅為相容性目的而保留。請避免使用它,如果可能,請更新現有程式碼;請參閱本頁底部的相容性表格以指導您的決策。請注意,此特性可能隨時停止工作。

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

請改用 BluetoothRemoteGATTCharacteristic.writeValueWithResponse()BluetoothRemoteGATTCharacteristic.writeValueWithoutResponse()

BluetoothRemoteGATTCharacteristic.writeValue() 方法將 BluetoothRemoteGATTCharacteristic 物件的 value 屬性設定為給定 ArrayBufferTypedArrayDataView 中包含的位元組,以可選的響應寫入特性值,並返回生成的 Promise