--- title: Bluetooth slug: Web/API/Bluetooth tags: - API - Bluetooth - Web Bluetooth API - Экспериментальное translation_of: Web/API/Bluetooth ---
Объект Bluetooth интерфейса Web Bluetooth API возвращает объект {{jsxref("Promise")}} объекту {{domxref("BluetoothDevice")}} с указанными параметрами.
interface Bluetooth : EventTarget {
[SecureContext] Promise<boolean> getAvailability();
[SecureContext] attribute EventHandler onavailabilitychanged;
[SecureContext, SameObject] readonly attribute BluetoothDevice? referringDevice;
[SecureContext] Promise<BluetoothDevice> requestDevice(optional RequestDeviceOptions options);
};
Bluetooth implements BluetoothDeviceEventHandlers;
Bluetooth implements CharacteristicEventHandlers;
Bluetooth implements ServiceEventHandlers;
Наследует свойства от родителя {{domxref("EventTarget")}}.
navigator.bluetooth.referringDevice.| Спецификация | Статус | Комментарии |
|---|---|---|
| {{SpecName('Web Bluetooth', '#bluetooth', 'Bluetooth')}} | {{Spec2('Web Bluetooth')}} | Первоначальное определение. |
{{Compat("api.Bluetooth")}}