BluetoothAttributeEvent

Tags: 2.5 Privileged

Description

The BluetoothAttributeEvent interface of the Bluetooth API provides access to changed attributes and their new values as the parameter of attributechanged event handlers (including BluetoothManager.onattributechanged, BluetoothAdapter.onattributechanged, and BluetoothDevice.onattributechanged), when fired.

Interface overview

[CheckAnyPermissions="bluetooth"]
interface BluetoothAttributeEvent : Event
{
  [Cached, Constant] readonly attribute sequence<DOMString> attrs;
};

Properties

  • BluetoothAttributeEvent.attrs Returns an array of changed attribute values, which may be BluetoothManagerAttributes, BluetoothAdapterAttributes, or BluetoothDeviceAttributes.
    • BluetoothManagerAttributes

      "unknown" or "defaultAdapter"

    • BluetoothAdapterAttributes

      "unknown", "state", "address", "name", "discoverable" or "discovering"

    • BluetoothDeviceAttributes

      "unknown", "cod", "name", "paired" or "uuids"

Example