You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As currently defined, the SerialPortInfo (permalink) is a generic maplike.
For the sake of being able to reason about information exposed explicitly, can the interface define the keys as constants? Even better would be to just introduce attributes with defined behavior when the specific property is not available.
The text was updated successfully, but these errors were encountered:
There is a long discussion of this on #20 and I will admit that after reading it I still don't understand why a maplike was chosen. In the current Chromium prototype a dictionary is used instead. I'm planning to change the specification to match.
Nevertheless, the current specification does seem to be reasonably specific about the set of recommended keys. I am planning on changing some of them. Please see crbug/1074383 for some of my recent thoughts.
Thanks for the pointers! I agree with your thoughts and direction in the Chromium bug.
The existence of keys like serialNumber was the reason that this came up during review. Having specific keys in the IDL and explained in the spec makes reviewing and auditing a bit more straightforward. Otherwise bits of information that are very relevant and should be carefully vetted can go overlooked.
In some ways the difference is superficial. Also in the case of the Serial API there's likely no practical way to prevent some identifier from being transferred in-band. So it's not a strong request.
As currently defined, the
SerialPortInfo
(permalink) is a generic maplike.For the sake of being able to reason about information exposed explicitly, can the interface define the keys as constants? Even better would be to just introduce attributes with defined behavior when the specific property is not available.
The text was updated successfully, but these errors were encountered: