I was defining them in the outer section of a node's Editor javascript.
But when I finally twigged that some clever person had added a feature a while back to allow node-specific resources to be loaded in the Editor simply by creating a /resources/ folder in the root of your package, I've now not only moved the editor JS to an external resource file that the node's html loads as a link, but I've also moved some Editor processing that is common across several nodes into a separate file as well.

Where ti-common.js contains, amongst other common code, the event handlers:
Note that the code is inside an IIFE (which may be overkill but of course this IS loaded along side many other scripts by the Editor so better safe than sorry) and I make sure that it will only run once no matter how many references to it there are.
Works very well.
The source for the html file (a build step is used to merge in the help and panel html so it is easier to develop.
<link type="text/css" rel="stylesheet" href="./resources/node-red-contrib-uibuilder/ti-common.css" media="all">
<script src="./resources/node-red-contrib-uibuilder/ti-common.js"></script>
<script src="./resources/node-red-contrib-uibuilder/uibuilder.js"></script>
<script type="text/html" class="ti-edit-panel" data-template-name="uibuilder">
<!--=include panel.html -->
</script>
<script type="text/html" data-help-name="uibuilder">
<!--=include help.html -->
</script>
