B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent

From MozillaWiki
< B2G‎ | Bluetooth‎ | WebBluetooth-v2
Revision as of 06:38, 5 March 2014 by Btian (talk | contribs) (Created page with "== Overview == BluetoothAttributeEvent is carried as the argument of attribute chagned event handlers, such as [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/Bluetoot...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

BluetoothAttributeEvent is carried as the argument of attribute chagned event handlers, such as adapter.onattributechanged and device.onattributechanged. Applications can get information about the changed attribute and its updated value.

Interface

interface BluetoothAttributeEvent : Event
{
  readonly attribute short attribute;
  readonly attribute any   value;
};

Attributes

attribute

Description
The changed attribute's enumeration value.
Value type
short
Default value
-1

See also

  • BluetoothAdapter.onattributechanged
  • BluetoothDevice.onattributechanged

value

Description
The updated value of the changed attribute. Its type depends on attribute's type.
Value type
any
Default value
null