B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent: Difference between revisions
< B2G | Bluetooth | WebBluetooth-v2
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
== Interface == | == Interface == | ||
[Func="Navigator::HasBluetoothSupport"] | |||
interface BluetoothAdapterEvent : Event | interface BluetoothAdapterEvent : Event | ||
{ | { | ||
readonly attribute BluetoothAdapter? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#adapter|adapter]]; | readonly attribute BluetoothAdapter? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#adapter|adapter]]; | ||
readonly attribute DOMString? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#address|address]]; | readonly attribute DOMString? [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#address|address]]; |
Revision as of 08:00, 8 May 2014
Overview
BluetoothAdapterEvent is carried as the parameter of manager.onadapteradded and manager.onadapterremoved event handlers. Applications can get the added BluetoothAdapter object or the address of removed adapter.
Interface
[Func="Navigator::HasBluetoothSupport"] interface BluetoothAdapterEvent : Event { readonly attribute BluetoothAdapter? adapter; readonly attribute DOMString? address; };
BluetoothAdapterEvent
Properties
isDefault
- Description
- Whether the added/removed adapter is default adapter (true) or not (false).
- Value type
- boolean
adapter
- Description
- The added adapter. The property is null for event handler manager.onadapterremoved since the corresponding BluetoothAdapter is already removed.
- Value type
- BluetoothAdapter
address
- Description
- The address of removed adapter. The property is null for event handler manager.onadapteradded since BluetoothAdapter already has property address.
- Value type
- DOMString