Bluetooth

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Bluetooth interface of the Web Bluetooth API provides methods to query Bluetooth availability and request access to devices.

EventTarget Bluetooth

Instance properties

Inherits properties from its parent EventTarget.

Instance methods

Bluetooth.getAvailability() Experimental

Returns a Promise that 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() Experimental

Returns a Promise that resolves to an array of BluetoothDevices this origin is allowed to access. Permission is obtained via previous calls to Bluetooth.requestDevice().

Bluetooth.requestDevice() Experimental

Returns a Promise to a BluetoothDevice object with the specified options.

Specifications

Specification
Web Bluetooth
# bluetooth

Browser compatibility

BCD tables only load in the browser