4 ms·
WebSerial was just introduced in Firefox 151. It was already available for 5 years in Chromium based browser. It's so new in Firefox that even caniuse is not up
by geekuillaume 5mo ago
WebSerial was just introduced in Firefox 151. It was already available for 5 years in Chromium based browser. It's so new in Firefox that even caniuse is not up-to-date: https://caniuse.com/web-serial https://caniuse.com/web-serial.
- peesem 5mo agointerestingly, MDN web docs claims at the top of the Web Serial page (https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_...) that Chrome does not support it, even though the support table at the bottom shows that it supports all of the features (Firefox doesn't) and has for longer than Firefox
- atopal 5mo agoThat's because Chrome on Android has a partial implementation of Web Serial. The banner on top is to get information at a glance vs the detailed breakdown of the compatibility table.
- firesteelrain 5mo agoEdge has had it for a while too.
- wasting_time 5mo agoIn case you don't know, Edge is a "Chromium-based browser" like GP mentioned.
- pjmlp 4mo agoWhich is why for a while Microsoft had Edge and EdgeChrome in parallel, until finally replacing one with the other.
- firesteelrain 4mo agoI did not know - thanks!
- gregstoll 5mo ago(I submitted a PR for caniuse a few days ago :-) https://github.com/Fyrd/caniuse/pull/7523 https://github.com/Fyrd/caniuse/pull/7523 )
- aetherspawn 4mo agoIs Web USB also supported?
- gregstoll 4mo agoNope, our standards position on that is still negative, for one thing.
- dazhbog 4mo agoIm sure its also negative for WebBLE but we are hoping that one day we can have it on Firefox too.. We use WebBLE for talking and programming NRF52 chips and it works great compared to plugging a wire every time.
- aetherspawn 4mo agoAh okay, thanks. My company makes web based diagnostic tools for automotive. At the moment we are Chrome-only because the CAN bus dongle doesn’t support serial. If the standards committee backpedaled on WebUSB it would literally destroy my company.
- tzs 5mo agoThat makes me curious. It would not be quite as seamless as having serial support included out of the box in the browser, but couldn't you get most of the way there by writing a native application that provides provides a network interface to the serial ports and then a JavaScript library for use in the browser than talks to that application over the network (maybe even making the JavaScript library API match the Web Serial API so code written for Chromium's actual Web Serial requires little of no porting)? The native apps for Linux, Windows, and MacOS would be pretty simple, and would be independent of browser vendor or version. This might even allow some flexibility that serial implemented in the browser doesn't have, such as allowing control of serial ports on a different host. I'd have expected that when people saw that Web Serial in Chromium opened up some great possibilities for things like browser based Arduino development but other browser makers were not on board someone would had thoughts similar to what I've described. Does this exist and I just missed it? Is there some major difficulty I've overlooked?
- sowbug 5mo agoYou could do that, but then either you're asking users to install a native app, which isn't very "webby," or you're shipping something with Firefox that isn't based on web standards*, which absolutely isn't webby. *Unless you're thinking of something I'm not, the API couldn't exactly match the Web Serial API because of same-origin policy, and if you made an exception to that policy to make the polyfill work, you'd punch a giant security hole in the browser.
- NeutralWanted 4mo agoWorkflow for what you described: 1. I go to your site 2. I download your service for my platform (that now has to be developed and shipped for N platforms your site wants to support 3. I install said service and make sure it's running 4. I go back to site and it's connected (or it's not and now you have to support a whole host of troubleshooting docs based on platform. Web serial version that's now in Firefox and has been in chromium: 1. I go to your site. It works What you described is something that has been done for awhile. Most recent thing I've used I can think of is Lenovos Driver install utility (you install their connector app, go to their support page, it connects to your app and then shows what drivers you need)