BluetoothRemoteGATTCharacteristic: phương thức writeValue()
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Hãy dùng BluetoothRemoteGATTCharacteristic.writeValueWithResponse() và BluetoothRemoteGATTCharacteristic.writeValueWithoutResponse() thay thế.
Phương thức BluetoothRemoteGATTCharacteristic.writeValue() đặt thuộc tính value của một đối tượng BluetoothRemoteGATTCharacteristic thành các byte chứa trong một ArrayBuffer, TypedArray, hoặc DataView đã cho, ghi giá trị đặc tính với phản hồi tùy chọn, rồi trả về Promise tương ứng.
Cú pháp
writeValue(buffer)
Tham số
value-
Một
ArrayBuffer,TypedArray, hoặcDataView.
Giá trị trả về
Một Promise.
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| Web Bluetooth> # dom-bluetoothremotegattcharacteristic-writevalue> |