code: function getElementSize(element) {
      const rect = element.getBoundingClientRect();
      return {
          width: Math.round(rect.width),
          height: Math.round(rect.height),
      };
  }
docs: Get element size
  @param {HTMLElement} element - element to return the size.
  @returns {Object} {width, height}