Confirmed users
891
edits
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 ("") |