4 ms·
So opening a directory picker and allowing access to user-selected files is fine, however opening a serial port picker and allowing access to user-selected seri
by Mister_Snuggles 4y ago
So opening a directory picker and allowing access to user-selected files is fine, however opening a serial port picker and allowing access to user-selected serial ports is not[0].
My use-case is a web-based system which includes, among other things, a payment function. I'm building an interface based on WebSerial to initiate transactions on a USB-connected Pin Pad[1]. This works beautifully in some Chromium-based browsers, but nowhere else[2].
This bothers me because it represents a dependency on Chromium and they could pull the rug out on WebSerial support any time. If other browsers supported it at least I'd have a fallback plan.
[0] https://mozilla.github.io/standards-positions/#webserial https://mozilla.github.io/standards-positions/#webserial
[1] For reference, the USB connection only exposes a control channel. You can initiate transactions and monitor their status, but the Pin Pad has an ethernet connection for actual communication to the payment processor. There is an option to use REST services provided by the payment processor to do the same thing, however that is significantly more development effort in our application.
[2] https://developer.mozilla.org/en-US/docs/Web/API/Serial#browser_compatibility https://developer.mozilla.org/en-US/docs/Web/API/Serial#brow...