B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent: Difference between revisions
< B2G | Bluetooth | WebBluetooth-v2
Jump to navigation
Jump to search
m (→Attributes) |
No edit summary |
||
Line 1: | Line 1: | ||
== Overview == | == Overview == | ||
'''BluetoothDeviceEvent''' is carried as the argument of [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondevicepaired adapter.ondevicepaired] and [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondeviceunpaired adapter.ondeviceunpaired] event handlers. Applications can get the paired [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice BluetoothDevice] object or the address of unpaired remote device. | |||
== Interface == | == Interface == | ||
interface BluetoothDeviceEvent : Event | interface BluetoothDeviceEvent : Event | ||
{ | { | ||
readonly attribute BluetoothDevice device; | readonly attribute BluetoothDevice? device; | ||
readonly attribute DOMString? address; | |||
}; | }; | ||
== Properties == | == Properties == | ||
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent# | * [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#device BluetoothAdapterEvent.device] | ||
* [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDeviceEvent#address BluetoothAdapterEvent.address] | |||
=== device === | === device === | ||
; Description | ; Description | ||
: | : The paired remote device. | ||
; Value type | ; Value type | ||
: [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice BluetoothDevice] | : [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice BluetoothDevice] | ||
; Default Value | |||
: Null pointer | |||
=== address === | |||
; Description | |||
: The address of unpaired remote device. | |||
; Value type | |||
: DOMString | |||
; Default Value | |||
: Empty string ("") |
Revision as of 03:23, 21 March 2014
Overview
BluetoothDeviceEvent is carried as the argument of adapter.ondevicepaired and adapter.ondeviceunpaired event handlers. Applications can get the paired BluetoothDevice object or the address of unpaired remote device.
Interface
interface BluetoothDeviceEvent : Event { readonly attribute BluetoothDevice? device; readonly attribute DOMString? address; };
Properties
device
- Description
- The paired remote device.
- Value type
- BluetoothDevice
- Default Value
- Null pointer
address
- Description
- The address of unpaired remote device.
- Value type
- DOMString
- Default Value
- Empty string ("")