@crg34711 also
here is a tutorial for handling buttons in JS
https://www.freecodecamp.org/news/html-button-onclick-javascript-click-event-tutorial/
one thing to note…
FINDING the button via ID
(getElementsByID), won’t work UNTIL AFTER you have returned from getDom()
because your new content is not IN the document tree (DOM) until MM inserts it after getDom() returns it…
you don’t need to do it the find way, just add an eventListener to the button element in the getDom() routine itself. you just created the button… so you have its object already
use the developer window (ctrl-shift-i) sources tab to debug step thru your code as it happens