In our production code we need to render user-declared html with a click handler that can identify which part of the provided html was clicked. We take advantage of event bubbling, but as event objects are recursive, we need to use a recursive decoding pattern to extract the data (from the dataset field) that we want.
Another way might be to set data- tags in the Html. Then put a mouse handler on whatever contains that, and let all events bubble up to it. From the contents of the data tags, figure out what was clicked, what action should result and so on.