BluetoothDeviceEvent
Description#
The BluetoothDeviceEvent interface of the Web Bluetooth API provides access to a found/paired device (BluetoothDevice) object or the address or an unpaired device as the parameter of a devicefound, devicepaired or deviceunpaired event handler (see BluetoothDiscoveryHandle.ondevicefound, BluetoothAdapter.ondevicepaired, and BluetoothAdapter.ondeviceunpaired), when fired.
Interface overview#
Properties#
BluetoothDeviceEvent.deviceread-onlyno-linkReturns a BluetoothDevice object representing the paired remote device. Returns null for the BluetoothAdapter.ondeviceunpaired event handler since the that only requires the address of the unpaired device.BluetoothDeviceEvent.addressread-onlyno-linkReturns a DOMString representing the address of the unpaired remote device. Returns null for the BluetoothDiscoveryHandle.ondevicefound and BluetoothAdapter.ondevicepaired event handlers since a found/paired remote device already has an BluetoothDevice.address property.