calculateHeightInFormToWorkspace() {
    let startElement = document.querySelector('form').firstElementChild;
    const lastElement = document.getElementById(config.elements.workspaceElementId);

    let heightBeforeWorkspace = 0;
    while (startElement !== lastElement) {
      if (startElement.tagName !== 'SCRIPT' && startElement.getClientRects) {
        const clientRects = startElement.getClientRects()[0];
        if (clientRects) {
          if (clientRects.height && clientRects.width) {
            heightBeforeWorkspace += clientRects.height;
          }
        }
      }
      startElement = startElement.nextElementSibling;
    }
    return heightBeforeWorkspace;
  }
/**
   * Calculate element height starting from first form element to
   * the s4 workspace element
   * @return {number}
   */
Calculate element height starting from first form element to
the s4 workspace element
@return {number}
Calculate element height starting from first form element to the s4 workspace element @return { number }
calculateHeightInFormToWorkspace() {
    let startElement = document.querySelector('form').firstElementChild;
    const lastElement = document.getElementById(config.elements.workspaceElementId);
    let heightBeforeWorkspace = 0;
    while (startElement !== lastElement) {
      if (startElement.tagName !== 'SCRIPT' && startElement.getClientRects) {
        const clientRects = startElement.getClientRects()[0];
        if (clientRects) {
          if (clientRects.height && clientRects.width) {
            heightBeforeWorkspace += clientRects.height;
          }
        }
      }
      startElement = startElement.nextElementSibling;
    }
    return heightBeforeWorkspace;
  }
calculateHeightInFormToWorkspace ( ) { let startElement = document . querySelector ( 'form' ) . firstElementChild ; const lastElement = document . getElementById ( config . elements . workspaceElementId ) ; let heightBeforeWorkspace = 0 ; while ( startElement !== lastElement ) { if ( startElement . tagName !== 'SCRIPT' && startElement . getClientRects ) { const clientRects = startElement . getClientRects ( ) [ 0 ] ; if ( clientRects ) { if ( clientRects . height && clientRects . width ) { heightBeforeWorkspace += clientRects . height ; } } } startElement = startElement . nextElementSibling ; } return heightBeforeWorkspace ; }
Calculate element height starting from first form element to
 the s4 workspace element
 @return {number}
Calculate element height starting from first form element to the s4 workspace element @return { number }