mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
requestDevice options (filters and optionalServices)
This commit is contained in:
parent
b01c52c18f
commit
66fbc4ac46
8 changed files with 361 additions and 81 deletions
|
@ -4,10 +4,22 @@
|
|||
|
||||
// https://webbluetoothcg.github.io/web-bluetooth/#bluetooth
|
||||
|
||||
dictionary BluetoothScanFilter {
|
||||
sequence<BluetoothServiceUUID> services;
|
||||
DOMString name;
|
||||
DOMString namePrefix;
|
||||
};
|
||||
|
||||
dictionary RequestDeviceOptions {
|
||||
required sequence<BluetoothScanFilter> filters;
|
||||
sequence<BluetoothServiceUUID> optionalServices /*= []*/;
|
||||
};
|
||||
|
||||
[Pref="dom.bluetooth.enabled"]
|
||||
interface Bluetooth {
|
||||
// Promise<BluetoothDevice> requestDevice(RequestDeviceOptions options);
|
||||
BluetoothDevice? requestDevice(/*RequestDeviceOptions options*/);
|
||||
[Throws]
|
||||
BluetoothDevice requestDevice(RequestDeviceOptions options);
|
||||
};
|
||||
|
||||
// Bluetooth implements EventTarget;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue