Sure it does - HTML can have a <script>
tag (so can the ui_template)
The function node ran is server (NOT client side / dashboard)
Read the help info and search the forum - it is perfectly possible (and has been covered lots and lots of times - search ui template send message)
the joystick demo runs client side (has nothing to do with node-red). If you make it work in the ui_template (i.e. the browser) and hook up the events to send
messages to node red - yes.