[web-bluetooth] [Scanning] requestLEScan(options) specification issue (#521)

motla has just created a new issue for https://github.com/WebBluetoothCG/web-bluetooth:

== [Scanning] requestLEScan(options) specification issue ==
In the `requestLEScan()` function descriptor of the Web Bluetooth Scanning specification, step 3 does not consider the case when `options.filters` is absent, which can be the case (when step 1 is true).

```
3. Let filters be options.filters.map(filter=>new BluetoothLEScanFilter(filter)). If this throws an exception, reject promise with that exception and abort these steps.
```

Maybe we should specify to set filters to an empty FrozenArray in this case, something like:

```
3. Let filters be options.filters.map(filter=>new BluetoothLEScanFilter(filter)) if options.filters is present, otherwise an empty FrozenArray. If this throws an exception, reject promise with that exception and abort these steps.
```

- See [requestLEScan(options) behavior](https://webbluetoothcg.github.io/web-bluetooth/scanning.html#dom-bluetooth-requestlescan)
- https://github.com/WebBluetoothCG/web-bluetooth/blob/0af495e496ec6651783e0a4619e111968559cacc/scanning.bs#L263-L269

Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/521 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 19 September 2020 11:52:11 UTC