Confirmed users
891
edits
| Line 217: | Line 217: | ||
; 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 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|BluetoothGatt]] object fails, or 2) connection to remote LE device fails. | : 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|BluetoothGatt]] object fails, or 2) connection to remote LE device fails. | ||
; Sample | ; Sample | ||