{{ apiref("Web Bluetooth API") }} {{Non-standard_header()}}
The Bluetooth
interface of the Web Bluetooth API returns a {{jsxref("Promise")}} to a {{domxref("BluetoothDevice")}} object with the specified options.
Interface
interface Bluetooth { Promise<BluetoothDevice> requestDevice(RequestDeviceOptions options); }; Bluetooth implements EventTarget; Bluetooth implements BluetoothDeviceEventHandlers; Bluetooth implements CharacteristicEventHandlers; Bluetooth implements ServiceEventHandlers;
Properties
- None
Methods
- {{domxref("Bluetooth.requestDevice()")}}
- Returns a {{jsxref("Promise")}} to a {{domxref("BluetoothDevice")}} object with the specified options.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('Web Bluetooth', '#dom-bluetooth-requestdevice', 'requestDevice()')}} | {{Spec2('Web Bluetooth')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatChrome (45.0)}} [1] |
Feature | Android | Android Webview | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatNo}} | {{CompatChrome (48.0)}} [2] |
[1] Behind a flag. Chrome OS only.
[2] Behind a flag. Requires Android 6 (Marshmallow).