Following up on Tim’s idea of using a button with a className. You could use a transparant button/element, on completion trigger that transparant button to become visible ( from the Html interaction ) and on that button/element you have onShow actions that will trigger whatever you want. This way on completion things can happen without user interaction. If you design the button/element to fit into the overall design it will look seamless.
You even can use a incredible small element ( 1 pixel ) to have no visual impact.