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

Jump to navigation Jump to search
s/ondeviceconnectionstatechanged/onconnectionstatechanged and use BluetoothStatusChangedEvent directly
(s/ondeviceconnectionstatechanged/onconnectionstatechanged and use BluetoothStatusChangedEvent directly)
Line 44: Line 44:
<!-- * [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattServer#onexecutewritereq|BluetoothGattServer.onexecutewritereq]] -->
<!-- * [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattServer#onexecutewritereq|BluetoothGattServer.onexecutewritereq]] -->


=== ondeviceconnectionstatechanged ===
=== onconnectionstatechanged ===
; Description
; Description
: A handler to trigger when a remote LE device has been connected or disconnected.
: A handler to trigger when a remote LE device has been connected or disconnected.
Line 50: Line 50:
; Argument
; Argument
  [CheckPermissions="bluetooth"]
  [CheckPermissions="bluetooth"]
  interface BluetoothDeviceConnectionStateEvent : Event
  interface BluetoothStatusChangedEvent : Event
  {
  {
   readonly attribute DOMString address;
   readonly attribute DOMString address;
   readonly attribute boolean connected;
   readonly attribute boolean status;
  };
  };


: ''address''
: ''address''
:: Address of the connected/disconnected remote LE device.
:: Address of the connected/disconnected remote LE device.
: ''connected''
: ''status''
:: Whether the remote LE device is connected (true) or disconnected (false).
:: Whether the remote LE device is connected (true) or disconnected (false).


120

edits

Navigation menu