Bluetooth
非标准: 该特性是非标准的,请尽量不要在生产环境中使用它!
Web Bluetooth API (en-US) 的**Bluetooth**接口返回指代BluetoothDevice (en-US)带有指定选项的对象的Promise。
接口
interface Bluetooth {
Promise<BluetoothDevice> requestDevice(RequestDeviceOptions options);
};
Bluetooth implements EventTarget;
Bluetooth implements BluetoothDeviceEventHandlers;
Bluetooth implements CharacteristicEventHandlers;
Bluetooth implements ServiceEventHandlers;
特性
无
方法
Bluetooth.requestDevice()-
返回一个包含指定选项的
BluetoothDevice(en-US)对象的Promise。
详细说明
| Specification |
|---|
| Web Bluetooth # bluetooth |
浏览器兼容性
BCD tables only load in the browser