-
Notifications
You must be signed in to change notification settings - Fork 133
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
Transfer result interface constructors not defined or called properly #207
Comments
If I were doing this today I would have specified all of the transfer result interfaces as dictionaries instead because that makes them easier to work with. Since this is shipping in browsers it's not worth trying to change it now. It only adds a little overhead. The places which construct a If you don't mind I'll re-purpose this issue for tracking the clean-up work to define and use the constructors properly. |
I understand they can't be changed now, and of course you can re-purpose this issue for that. For my last question, my understanding is that |
I'm not familiar with the particular performance characteristics of interfaces vs. dictionaries in different Javascript implementations. In both specification language and Blink/V8 it is significantly simpler to work with a dictionary than an interface. |
Today I found that
USBInTransferResult
is actually a constructor onwindow
, that looks strange, who would want tonew
aUSBInTransferResult
?Also, it's defined as
webusb/index.bs
Lines 1319 to 1323 in 7d7fab1
But steps in
controlTransferIn
says:webusb/index.bs
Line 1046 in 7d7fab1
USBInTransferResult
's constructor has parameters, but here it's not specified?webusb/index.bs
Lines 1051 to 1053 in 7d7fab1
USBInTransferResult.status
is a read only attribute, is it allowed to write it?Earlier today I was reading WebCodecs spec, there many return types are dictionaries, with optional members, but in the steps they are definitely assigned. What's the general guideline for using interfaces or dictionaries as return types?
The text was updated successfully, but these errors were encountered: