function getStyleAttrValue(element, attr) {
    // Check style before computedStyle as computedStyle is expensive.
    return element.style[attr] || window.getComputedStyle(element)[attr];
  }
@param {HTMLElement} element
@param {'overflowY'|'position'} attr
@return {string}