BluetoothRemoteGATTCharacteristic: writeValue() 方法
已弃用:此特性不再推荐。虽然某些浏览器可能仍然支持它,但它可能已经从相关的网络标准中删除,可能正在删除过程中,或者可能仅为兼容性目的而保留。请避免使用它,如果可能,请更新现有代码;请参阅本页底部的兼容性表格以指导您的决策。请注意,此特性可能随时停止工作。
请改用 BluetoothRemoteGATTCharacteristic.writeValueWithResponse() 和 BluetoothRemoteGATTCharacteristic.writeValueWithoutResponse()。
BluetoothRemoteGATTCharacteristic.writeValue() 方法将 BluetoothRemoteGATTCharacteristic 对象的 value 属性设置为给定 ArrayBuffer、TypedArray 或 DataView 中包含的字节,以可选的响应写入特性值,并返回生成的 Promise。