Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BluetoothAdvertisingEventInit.{manufacturer,service}Data's type is unclear #597

Open
rakuco opened this issue Oct 20, 2022 · 1 comment
Open

Comments

@rakuco
Copy link

rakuco commented Oct 20, 2022

The BluetoothAdvertisingEventInit dictionary has

  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.
@reillyeon
Copy link
Contributor

This dictionary would only be used when script is constructing a BluetoothAdvertisingEvent, which is not currently supported in Chromium (only UA-constructed objects are implemented) so I'm not surprised the specification text is a little wonky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants