WICG / webusb

Connecting hardware to the web.
https://wicg.github.io/webusb/
Other
1.3k stars 126 forks source link

Fix InvalidStateError condition for claimInterface #160

Closed dsanders11 closed 5 years ago

dsanders11 commented 5 years ago

The current text seems like a typo.


Preview | Diff

reillyeon commented 5 years ago

Thanks for the pull request. This is indeed a typo however it highlights the inconsistency between open() and claimInterface() where opening a device twice is not an error but claiming an interface twice is. Looking at the Chrome implementation I see that redundant calls to claimInterface() are allowed and the web-platform-tests agree. I think we should update the specification for claimInterface() and releaseInterface() to resolve if claimed is true or false respectively.

dsanders11 commented 5 years ago

Seems reasonable. You can go ahead and close this if you're going to make larger changes.

reillyeon commented 5 years ago

I'm going to merge this anyways because of the typo and file an issue about relaxing the interface.