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
The current implementation of getInfo() actually doesn't match the specification at all. It returns a SerialOptions rather than a SerialPortInfo. That's why it requires the device to be open, so it can read back the current device configuration. If it returned a SerialPortInfo that could be constructed only from attributes of the underlying USBDevice interface.
I understand. But in order to be closer to the Web Serial implementation, it should not reject. Otherwise I would need to again have checks in place if the polyfill or the real deal is used - which is not what I should be having to do when using a polyfill.
If device info is not available would it not be an option to simply return some dummy data for vendor and product id?
In the "real" Web Serial API one can query information about the available ports before opening a connection:
But results in a rejection with the polyfill:
The text was updated successfully, but these errors were encountered: