szn-tethered.js
function getContentDimensions(instance) {
    const contentElement = instance._root.firstElementChild
    if (!contentElement) {
      return {
        width: 0,
        height: 0,
      }
    }

    let width
    let height
    if (window.devicePixelRatio > 1) {
      // This is much less performant, so we use in only on HiDPi displays
      const bounds = contentElement.getBoundingClientRect()
      width = bounds.width
      height = bounds.height
    } else {
      width = contentElement.scrollWidth
      height = contentElement.scrollHeight
    }

    return {
      width,
      height,
    }
  }
function getContentDimensions(instance) {
    const contentElement = instance._root.firstElementChild
    if (!contentElement) {
      return {
        width: 0,
        height: 0,
      }
    }

    let width
    let height
    if (window.devicePixelRatio > 1) {
      // This is much less performant, so we use in only on HiDPi displays
      const bounds = contentElement.getBoundingClientRect()
      width = bounds.width
      height = bounds.height
    } else {
      width = contentElement.scrollWidth
      height = contentElement.scrollHeight
    }

    return {
      width,
      height,
    }
  }
function getContentDimensions ( instance ) { const contentElement = instance . _root . firstElementChild if ( ! contentElement ) { return { width : 0 , height : 0 , } } let width let height if ( window . devicePixelRatio > 1 ) { // This is much less performant, so we use in only on HiDPi displays const bounds = contentElement . getBoundingClientRect ( ) width = bounds . width height = bounds . height } else { width = contentElement . scrollWidth height = contentElement . scrollHeight } return { width , height , } }
Returns the dimensions of the content of the provided szn-tethered element.

@param {SznElements.SznTethered} instance The instance of the szn-tethered element.
@return {ContentDimensions} The dimensions of the tethered content.
Returns the dimensions of the content of the provided szn - tethered element .