code: function getBoundingRect(el) {
      const clientRect = el.getBoundingClientRect();
      const bound = {
        left: clientRect.left,
        top: clientRect.top,
        width: clientRect.width,
        height: clientRect.height
      };
  
      let frame = el.ownerDocument.defaultView.frameElement;
      while (frame) {
        const frameBound = frame.getBoundingClientRect();
        // This computation doesn't account for more complex CSS transforms on the
        // frame (e.g. scaling or rotations).
        bound.left += frameBound.left;
        bound.top += frameBound.top;
  
        frame = frame.ownerDocument.frameElement;
      }
      return bound;
    }
docs: Returns the bounding rectangle wrt to the layout viewport.