BluetoothAdapterEvent

Tags: 2.5 Privileged

Description

The BluetoothAdapterEvent interface of the Bluetooth API provides access to a BluetoothAdapter object and its address as the parameter of a adapteradded or adapterremoved event handler (see BluetoothManager.onadapteradded and BluetoothManager.onadapterremoved), when fired.

Interface overview

[CheckAnyPermissions="bluetooth"]
interface BluetoothAdapterEvent : Event
{
  readonly attribute BluetoothAdapter? adapter;
  readonly attribute DOMString?        address;
};

Properties

  • BluetoothAdapterEvent.adapter Returns the BluetoothAdapter object. This is null for the BluetoothManager.onadapterremoved event handler since the corresponding adapter is already removed.

  • BluetoothAdapterEvent.address Returns a DOMString representing the address of the removed adapter. The property is null for the BluetoothManager.onadapteradded event handler since the adapter already has an BluetoothAdapter.address property.