BluetoothRemoteGATTCharacteristic: writeValue() メソッド
非推奨;: この機能は非推奨になりました。まだ対応しているブラウザーがあるかもしれませんが、すでに関連するウェブ標準から削除されているか、削除の手続き中であるか、互換性のためだけに残されている可能性があります。使用を避け、できれば既存のコードは更新してください。このページの下部にある互換性一覧表を見て判断してください。この機能は突然動作しなくなる可能性があることに注意してください。
かわりに BluetoothRemoteGATTCharacteristic.writeValueWithResponse() や BluetoothRemoteGATTCharacteristic.writeValueWithoutResponse() を使用してください。
BluetoothRemoteGATTCharacteristic.writeValue() メソッドは、BluetoothRemoteGATTCharacteristic オブジェクトの value プロパティを渡された ArrayBuffer に格納されたバイト列に設定し、WriteCharacteristicValue(this=this, value=value, response="optional") を呼び出し、結果の Promise を返します。
構文
js
writeValue(value)
引数
value-
ArrayBufferです。
返値
Promise です。
仕様書
| Specification |
|---|
| Web Bluetooth> # dom-bluetoothremotegattcharacteristic-writevalue> |
ブラウザーの互換性
Loading…