Skip to content

Clarify wording on object equality #241

@RReverser

Description

@RReverser

Is USBDevice equality guaranteed between different calls to getDevices() or requestDevice(), assuming that given device wasn't disconnected in between?

I assume it has to be - and, indeed, in the current implementation it seems so - otherwise things like comparing device from ondisconnect event with the stored instance also wouldn't work, but the spec only uses loose wording like

Add the USBDevice object representing device to devices.

which could also mean that implementation might be returning a collection of new USBDevices for each getDevices() call.

If it is indeed guaranteed, it should be reflected in the spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions