packages/fbjs/src/core/dom/getElementPosition.js
function getElementPosition(element) {
  const rect = getElementRect(element);
  return {
    x: rect.left,
    y: rect.top,
    width: rect.right - rect.left,
    height: rect.bottom - rect.top
  };
}
function getElementPosition(element) {
  const rect = getElementRect(element);
  return {
    x: rect.left,
    y: rect.top,
    width: rect.right - rect.left,
    height: rect.bottom - rect.top
  };
}
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}
Gets an element s position in pixels relative to the viewport . The returned object represents the position of the element s top left corner .