code: function getBBox(element, getPaddingBox) {
    const rect = element.getBoundingClientRect(),
      bBox = {left: rect.left, top: rect.top, width: rect.width, height: rect.height};
    bBox.left += window.pageXOffset;
    bBox.top += window.pageYOffset;
    if (getPaddingBox) {
      const style = window.getComputedStyle(element, ''),
        borderTop = parseFloat(style.borderTopWidth) || 0,
        borderRight = parseFloat(style.borderRightWidth) || 0,
        borderBottom = parseFloat(style.borderBottomWidth) || 0,
        borderLeft = parseFloat(style.borderLeftWidth) || 0;
      bBox.left += borderLeft;
      bBox.top += borderTop;
      bBox.width -= borderLeft + borderRight;
      bBox.height -= borderTop + borderBottom;
    }
    return validBBox(bBox);
  }
docs: [DEBUG/] 
  @param {Element} element - A target element.
  @param {?boolean} getPaddingBox - Get padding-box instead of border-box as bounding-box.
  @returns {BBox} A bounding-box of `element`.