---
title: Bluetooth
slug: Web/API/Bluetooth
tags:
  - API
  - 接口
  - 网页蓝牙接口说明
  - 蓝牙
  - 说明
translation_of: Web/API/Bluetooth
---
<p>{{ apiref("Web Bluetooth API") }} {{Non-standard_header()}}</p>

<p><a href="/Web/API/Web_Bluetooth_API">Web Bluetooth API</a> 的<strong><code>Bluetooth</code></strong><code>接口</code>返回指代{{domxref("BluetoothDevice")}}带有指定选项的对象的{{jsxref("Promise")}}。</p>

<h2 id="接口">接口</h2>

<pre class="syntaxbox">interface <dfn>Bluetooth</dfn> {
  Promise&lt;BluetoothDevice&gt; requestDevice(RequestDeviceOptions <dfn>options</dfn>);
};
Bluetooth implements EventTarget;
Bluetooth implements BluetoothDeviceEventHandlers;
Bluetooth implements CharacteristicEventHandlers;
Bluetooth implements ServiceEventHandlers;</pre>

<h2 id="特性">特性</h2>

<dl>
 <dt>无</dt>
</dl>

<h2 id="方法">方法</h2>

<dl>
 <dt>{{domxref("Bluetooth.requestDevice()")}}</dt>
 <dd>返回一个包含指定选项的{{domxref("BluetoothDevice")}}对象的{{jsxref("Promise")}}。</dd>
</dl>

<h2 id="详细说明">详细说明</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Web Bluetooth', '#bluetooth', 'Bluetooth')}}</td>
   <td>{{Spec2('Web Bluetooth')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>

{{Compat("api.Bluetooth")}}