[web-bluetooth] BluetoothAdvertisingEventInit.{manufacturer,service}Data's type is unclear (#597)

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

== BluetoothAdvertisingEventInit.{manufacturer,service}Data's type is unclear ==
The `BluetoothAdvertisingEventInit` dictionary has

```webidl
  BluetoothManufacturerDataMap manufacturerData;
  BluetoothServiceDataMap serviceData;
```

whose handling is unclear:

* The `BluetoothManufacturerDataMap` and `BluetoothServiceDataMap` interfaces do not have constructors, so user code cannot create new instances at will.
* Even if they did, the interfaces do not expose any methods to add or remove data from each map: not only are the `maplike` declarations `readonly`, but the backing "map entries" is not exposed to user code.
* https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothadvertisingevent-bluetoothadvertisingevent performs some data conversions while looping through `manufacturerData` and `serviceData` that look superfluous/odd if the input data is of the same type as the output.

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


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

Received on Thursday, 20 October 2022 10:15:06 UTC