At the time of writing,
there is no way
to send UDP packets
from client-side JavaScript
running in a web browser.
That might seem a strange thing
to want to do,
but I do have a legitimate use case (I think).

UDP is a common protocol choice for monitoring systems,
where the issues of dropped packets and
preserving transmission order
are typically of lesser importance
than the ability to log
large numbers of events
with minimal overhead.
In my case,
I need to send client-side RUM data
to a UDP monitoring server,
but crucially the pages that I am monitoring
are being served by a number of different back-end platforms.

Rather than adding
a monitoring endpoint
to every back-end,
it is far simpler for me
to create a separate server
that can act as a unified proxy,
reponsible for sending all of my monitoring data over UDP.