code: function getElementSize(element) {
              if (!element.getBoundingClientRect) {
                  return {
                      width: element.offsetWidth,
                      height: element.offsetHeight
                  }
              }
  
              var rect = element.getBoundingClientRect();
              return {
                  width: Math.round(rect.width),
                  height: Math.round(rect.height)
              }
          }
docs: Get element size
  @param {HTMLElement} element
  @returns {Object} {width, height}