function getScrollElement(element) {
    if (element === window || element === DOC_ELEM || element === BODY) {
      return window;
    } else {
      return element;
    }
  }
@param {HTMLElement|Window} element
@returns {HTMLElement|Window}