web api instance method
Bluetooth: getDevices() method
Limited availabilitySecure context
The getDevices() method of the Bluetooth interface returns an array containing the Bluetooth devices that this origin is allowed to access — including those that are out of range and powered off.
Syntax
getDevices()
Parameters
None.
Return value
A Promise that resolves with an array of BluetoothDevice objects.
Exceptions
SecurityErrorDOMException- : Thrown if this operation is not permitted in this context due to security concerns, such as being called when access to the current document is blocked by the Permissions Policy directive
bluetooth.
- : Thrown if this operation is not permitted in this context due to security concerns, such as being called when access to the current document is blocked by the Permissions Policy directive
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.