document.addEventListener('click', ...
Instead of someButton.addEventListener('click', ...
And in fact, all the framework example show button onClick not document onClickI know some situations where adding the event listener to the document is correct but I've never seen it in this button type situation.
Is that pattern for buttons common? What does it solve?