B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent: Difference between revisions
< B2G | Bluetooth | WebBluetooth-v2
Jump to navigation
Jump to search
| Line 3: | Line 3: | ||
== Interface == | == Interface == | ||
[Func="Navigator::HasBluetoothSupport"] | |||
interface BluetoothDeviceEvent : Event | interface BluetoothDeviceEvent : Event | ||
{ | { | ||
Revision as of 08:02, 8 May 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
[Func="Navigator::HasBluetoothSupport"]
interface BluetoothDeviceEvent : Event
{
readonly attribute BluetoothDevice? device;
readonly attribute DOMString? address;
};
Properties
device
- Description
- The paired remote device. The property is null for event handler adapter.ondeviceunpaired since the event handler only requires the address of unpaired device.
- Value type
- BluetoothDevice
address
- Description
- The address of unpaired remote device. The property is null for event handler adapter.ondevicepaired since BluetoothDevice already has property address.
- Value type
- DOMString