Skip to content

BluetoothLEScanFilter's manufacturerData and serviceData are not arrays #636

Description

@jeroen1602

The BluetoothLEScanFilters dictionary is created from an BluetoothLEScanFilterInit but its manufacturerData and serviceData fields aren't an array.

web-bluetooth/scanning.bs

Lines 374 to 382 in f3b3187

[Exposed=Window, SecureContext]
interface BluetoothLEScanFilter {
constructor(optional BluetoothLEScanFilterInit init = {});
readonly attribute DOMString? name;
readonly attribute DOMString? namePrefix;
readonly attribute FrozenArray<UUID> services;
readonly attribute BluetoothManufacturerDataFilter manufacturerData;
readonly attribute BluetoothServiceDataFilter serviceData;
};

In the BluetoothLEScanFilterInit dictionary that is used in the constructor they are referenced as being a sequence so when converting to an BluetoothLEScanFilters what needs to happen to the extra items in the array?

web-bluetooth/index.bs

Lines 529 to 535 in f3b3187

dictionary BluetoothLEScanFilterInit {
sequence<BluetoothServiceUUID> services;
DOMString name;
DOMString namePrefix;
sequence<BluetoothManufacturerDataFilterInit> manufacturerData;
sequence<BluetoothServiceDataFilterInit> serviceData;
};

The docs seem to assume that the fields are singular and not an array.

web-bluetooth/scanning.bs

Lines 419 to 426 in f3b3187

<li>
Initialize <code>this.{{BluetoothLEScanFilter/manufacturerData}}</code> as
<code>new BluetoothManufacturerDataFilter(|init|.{{BluetoothLEScanFilterInit/manufacturerData}})</code>.
</li>
<li>
Initialize <code>this.{{BluetoothLEScanFilter/serviceData}}</code> as
<code>new BluetoothServiceDataFilter(|init|.{{BluetoothLEScanFilterInit/serviceData}})</code>.
</li>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions