B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent: Difference between revisions
< B2G | Bluetooth | WebBluetooth-v2
Jump to navigation
Jump to search
| Line 5: | Line 5: | ||
interface BluetoothDeviceEvent : Event | interface BluetoothDeviceEvent : Event | ||
{ | { | ||
readonly attribute BluetoothDevice? device; | readonly attribute BluetoothDevice? [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#device device]; | ||
readonly attribute DOMString? address; | readonly attribute DOMString? [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#address address]; | ||
}; | }; | ||
Revision as of 03:25, 24 March 2014
Overview
BluetoothDeviceEvent is carried as the paramter of remote device paired/unpaired event handlers, including adapter.ondevicepaired and adapter.ondeviceunpaired. Applications can get the paired BluetoothDevice object or the address of unpaired remote device.
Interface
interface BluetoothDeviceEvent : Event
{
readonly attribute BluetoothDevice? device;
readonly attribute DOMString? address;
};
Properties
device
- Description
- The paired remote device.
- Value type
- BluetoothDevice
- Default Value
- Null pointer
address
- Description
- The address of unpaired remote device.
- Value type
- DOMString
- Default Value
- Empty string ("")