I do it at my company, to talk to microcontrollers. We have a few CLI tools we use for testing that run on NodeJS. Our web-wrapped maintenance desktop application also sends UDP packages directly to microcontrollers but there we do it a bit differently. We have a proxy that forwards websocket messages as UDP packets running in the native code of our desktop application.
Would be really nice if we could send UDP messages directly from the browser, but it is understandable from security perspective.