function getScrollHandleBounds(body, target) {
  let bounds;
  // We have to do the check for the scrollTop and if target === document.body here and set to variables
  // because we may reset target below.
  const targetScrollTop = target.scrollTop;
  const targetIsBody = target === document.body;

  if (targetIsBody) {
    target = document.documentElement;

    bounds = {
      left: pageXOffset,
      top: pageYOffset,
      height: innerHeight,
      width: innerWidth
    };
  } else {
    bounds = getBounds(body, target);
  }

  const style = getComputedStyle(target);

  const hasBottomScroll = (
    target.scrollWidth > target.clientWidth ||
    [style.overflow, style.overflowX].indexOf('scroll') >= 0 ||
    !targetIsBody
  );

  let scrollBottom = 0;
  if (hasBottomScroll) {
    scrollBottom = 15;
  }

  const height = bounds.height - parseFloat(style.borderTopWidth) - parseFloat(style.borderBottomWidth) - scrollBottom;

  const out = {
    width: 15,
    height: height * 0.975 * (height / target.scrollHeight),
    left: bounds.left + bounds.width - parseFloat(style.borderLeftWidth) - 15
  };

  let fitAdj = 0;
  if (height < 408 && targetIsBody) {
    fitAdj = -0.00011 * Math.pow(height, 2) - 0.00727 * height + 22.58;
  }

  if (!targetIsBody) {
    out.height = Math.max(out.height, 24);
  }

  const scrollPercentage = targetScrollTop / (target.scrollHeight - height);
  out.top = scrollPercentage * (height - out.height - fitAdj) + bounds.top + parseFloat(style.borderTopWidth);

  if (targetIsBody) {
    out.height = Math.max(out.height, 24);
  }

  return out;
}
Gets bounds for when target modifiier is 'scroll-handle'
@param target
@return {{left: number, width: number, height: number}}