B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent

From MozillaWiki
Jump to navigation Jump to search

Overview

BluetoothAdapterEvent is carried as the argument of manager.onadapteradded and manager.onadapterremoved event handlers. Applications can know whether the added/removed adapter is default adapter, and get the added BluetoothAdapter object or the address of removed adapter.

Interface

interface BluetoothAdapterEvent : Event
{
  readonly attribute boolean isDefault;

  readonly attribute BluetoothAdapter? adapter;
  readonly attribute DOMString? address;
};

Properties

isDefault

Description
Whether the added/removed adapter is default adapter (true) or not (false).
Value type
boolean

adapter

Description
The added adapter.
Value type
BluetoothAdapter
Default value
Null pointer

address

Description
The address of removed adapter.
Value type
DOMString
Default value
Empty string ("")