szn-tethered.js
function getTetherBounds(tether) {
    const bounds = tether.getBoundingClientRect()
    const width = bounds.width
    const height = bounds.height

    let x = 0
    let y = 0
    let tetherOffsetContainer = tether
    while (tetherOffsetContainer) {
      x += tetherOffsetContainer.offsetLeft
      y += tetherOffsetContainer.offsetTop
      tetherOffsetContainer = tetherOffsetContainer.offsetParent
    }

    return {
      screenX: bounds.left,
      screenY: bounds.top,
      x,
      y,
      width,
      height,
    }
  }
function getTetherBounds(tether) {
    const bounds = tether.getBoundingClientRect()
    const width = bounds.width
    const height = bounds.height

    let x = 0
    let y = 0
    let tetherOffsetContainer = tether
    while (tetherOffsetContainer) {
      x += tetherOffsetContainer.offsetLeft
      y += tetherOffsetContainer.offsetTop
      tetherOffsetContainer = tetherOffsetContainer.offsetParent
    }

    return {
      screenX: bounds.left,
      screenY: bounds.top,
      x,
      y,
      width,
      height,
    }
  }
function getTetherBounds ( tether ) { const bounds = tether . getBoundingClientRect ( ) const width = bounds . width const height = bounds . height let x = 0 let y = 0 let tetherOffsetContainer = tether while ( tetherOffsetContainer ) { x += tetherOffsetContainer . offsetLeft y += tetherOffsetContainer . offsetTop tetherOffsetContainer = tetherOffsetContainer . offsetParent } return { screenX : bounds . left , screenY : bounds . top , x , y , width , height , } }
Calculates and returns both the on-screen and on-page location and dimensions of the provided tether element.

@param {Element} tether The tethering element.
@return {TetherBounds} The on-screen and on-page location and dimensions of the element.
Calculates and returns both the on - screen and on - page location and dimensions of the provided tether element .