requestDevice options (filters and optionalServices)

This commit is contained in:
zakorgy 2016-04-06 16:26:52 +02:00 committed by Attila Dusnoki
parent b01c52c18f
commit 66fbc4ac46
8 changed files with 361 additions and 81 deletions

View file

@ -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;