function getElementPosition(element) {
  const rect = getElementRect(element);
  return {
    x: rect.left,
    y: rect.top,
    width: rect.right - rect.left,
    height: rect.bottom - rect.top
  };
}
Gets an element's position in pixels relative to the viewport. The returned
object represents the position of the element's top left corner.

@param {DOMElement} element
@return {object}