Consider making this more general by just taking an array of DOM elements as the argument. If the element is ``input type="text"`` then add a ``isEnterKey`` keyup handler, else add a click handler. There is no need to artificially restrict it to one clickable element called "button".