function registerHorizontalScroll(element, smoothScroll = true) {
  if (element) {
    // eslint-disable-next-line no-param-reassign
    element.onmousewheel = (e) => {
      scrollHorizontally(e, element, smoothScroll);
    };
  }
}
Registers horizontal scroll to given element
when mouse wheel event is triggered

@param {HTMLElement} element
Element to be applied upon

@param {boolean} smoothScroll
Whether to set `scrollBehavior` to "smooth"