B2G/Bluetooth/WebBluetooth-v2/BluetoothAddressEvent: Difference between revisions

 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Overview ==
== Overview ==
The BluetoothAddressEvent API provides access to a Bluetooth address when the ''adapterremoved'' or ''deviceunpaired'' event is fired. See [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothManager#adapterremoved BluetoothManager.adapterremoved] and [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#deviceunpaired BluetoothAdapter.ondevicepaired] for more information.
'''BluetoothAddressEvent''' is carried as the argument of [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothManager#onadapteradded manager.onadapterremoved] and [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondeviceunpaired adapter.ondeviceunpaired] event handlers. Applications can get the address of removed adapter and knows whether the removed adapter is default adapter for [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothManager#onadapteradded manager.onadapterremoved]; For [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondeviceunpaired adapter.ondeviceunpaired], applications get the address of unpaired remote bluetooth device.


== Interface ==
== Interface ==
  interface BluetoothAddressEvent : Event
  interface BluetoothAddressEvent : Event
  {
  {
   readonly attribute BluetoothAddress address;
   readonly attribute DOMString address;
  readonly attribute boolean?  isDefault;
  };
  };


== Attributes ==
== Properties ==
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAddressEvent#address BluetoothAddressEvent.address]
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAddressEvent#address BluetoothAddressEvent.address]


=== address ===
=== address ===
; Description
; Description
: A BluetoothAddress object representing the address to access
: Represents the bluetooth address


; Value type
; Value type
: BluetoothAddress
: DOMString
Confirmed users
891

edits