hunk.code_window:   const rect = element.getBoundingClientRect();
     let scaleX = 1;
     let scaleY = 1;
     if (isHTMLElement(element) && includeScale) {
       // Fallback to 1 in case both values are `0`
  
hunk.labels: keep keep keep keep add keep
hunk.after_edit:     const offsetHeight = element.offsetHeight;
       const offsetWidth = element.offsetWidth;
       // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
  
hunk.file_path: src/dom-utils/getBoundingClientRect.js
hunk.type: add
file: <!DOCTYPE html> <title>Basic Visual Test</title>
  
  <style>
    @import '/reset.css';
    html,
    body {
      height: 1500px;
    }
  
    #reference {
      position: relative;
      top: 150px;
      left: 150px;
      width: 200px;
      height: 200px;
      background-color: red;
      box-shadow: inset 0 0 0 1px black;
    }
  
    #popper {
      width: 100px;
      height: 100px;
      background-color: rebeccapurple;
      box-shadow: inset 0 0 0 1px black;
    }
  </style>
  
  <table>
    <tr>
      <td>
        cell
      </td>
      <td>
        cell
      </td>
      <td>
        <div id="reference">Reference Box</div>
      </td>
    </tr>
  </table>
  
  <div id="popper">Popper Box</div>
  
  <script type="module">
    import { createPopper } from '../dist/popper.js';
    const reference = document.querySelector('#reference');
    const popper = document.querySelector('#popper');
  
    window.instance = createPopper(reference, popper, {
      placement: 'right',
    });
  </script>
  