Confirmed users
891
edits
| Line 220: | Line 220: | ||
; Return | ; Return | ||
: A Promise to indicate whether the operation is resolved or rejected. If the Promise is resolved, it returns a [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt#BluetoothGatt|BluetoothGatt]] object whose property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt#connectionState|connectionState]] is connected. The promise is rejected if 1) the device is not of type le or dual, 2) creation of [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt#BluetoothGatt|BluetoothGatt]] object fails, or | : A Promise to indicate whether the operation is resolved or rejected. If the Promise is resolved, it returns a [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt#BluetoothGatt|BluetoothGatt]] object whose property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt#connectionState|connectionState]] is connected. The promise is rejected if 1) the device is not of type le or dual, 2) creation of [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt#BluetoothGatt|BluetoothGatt]] object fails, or 3) connection to remote LE device fails. | ||
; Sample | ; Sample | ||