-
Notifications
You must be signed in to change notification settings - Fork 131
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
Clarify wording on object equality #241
Comments
Yes, object equality is guaranteed. I think this is already guaranteed by the spec, but it could be made more explicit. The spec describes how to create "a new We use the same "the For WebHID I defined an internal slot navigator.hid.[[devices]] to hold |
Yeah it doesn't say "new" but between
and
it's easy to misread this combination as if enumerated devices might be not cached and, correspondingly, that devices will be discovered anew and, correspondingly, wrapped into new I'm glad to hear it's guaranteed as this will simplify some code I have, just saying the spec wording could be more explicit here in that case. |
Is
USBDevice
equality guaranteed between different calls togetDevices()
orrequestDevice()
, 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 likewhich could also mean that implementation might be returning a collection of new
USBDevice
s for eachgetDevices()
call.If it is indeed guaranteed, it should be reflected in the spec.
The text was updated successfully, but these errors were encountered: