B2G/Bluetooth/WebBluetooth-v2/BluetoothAttributeEvent: Difference between revisions
< B2G | Bluetooth | WebBluetooth-v2
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
=== attribute === | === attribute === | ||
; Description | ; Description | ||
: The changed attribute's enumeration value. | : The changed attribute's enumeration value. The enumeration is either [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice#BluetoothAdapterAttribute BluetoothAdapterAttribute] or [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice#BluetoothDeviceAttribute BluetoothDeviceAttribute]. | ||
; Value type | ; Value type |
Revision as of 06:45, 5 March 2014
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. The enumeration is either BluetoothAdapterAttribute or BluetoothDeviceAttribute.
- Value type
- short
- Default value
- -1
value
- Description
- The updated value of the changed attribute. Its type depends on attribute's type.
- Value type
- any
- Default value
- null