このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

BluetoothRemoteGATTCharacteristic: writeValue() メソッド

Deprecated

Avoid using this feature in new projects. This feature may be a candidate for removal from web standards or browsers.

かわりに BluetoothRemoteGATTCharacteristic.writeValueWithResponse()BluetoothRemoteGATTCharacteristic.writeValueWithoutResponse() を使用してください。

BluetoothRemoteGATTCharacteristic.writeValue() メソッドは、BluetoothRemoteGATTCharacteristic オブジェクトの value プロパティを渡された ArrayBuffer に格納されたバイト列に設定し、WriteCharacteristicValue(this=this, value=value, response="optional") を呼び出し、結果の Promise を返します。

構文

js
writeValue(value)

引数

value

ArrayBuffer です。

返値

Promise です。

仕様書

仕様書
Web Bluetooth
# dom-bluetoothremotegattcharacteristic-writevalue

ブラウザーの互換性