Bluetooth
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
TheBluetooth interface of theWeb Bluetooth API provides methods to query Bluetooth availability and request access to devices.
In this article
Instance properties
Inherits properties from its parentEventTarget.
Instance methods
Bluetooth.getAvailability()ExperimentalReturns a
Promisethat resolves to a boolean value indicating whether the user agent can support Bluetooth. Some user agents let the user configure an option that specifies what value is returned by this method.Bluetooth.getDevices()ExperimentalReturns a
Promisethat resolves to an array ofBluetoothDevices this origin is allowed to access. Permission is obtained via previous calls toBluetooth.requestDevice().Bluetooth.requestDevice()ExperimentalReturns a
Promisethat resolves to aBluetoothDeviceobject matching the specified options.
Specifications
| Specification |
|---|
| Web Bluetooth> # bluetooth> |