 setLayout(layoutType, splitRatio);
      updateDividerPosition();
    });

    document.addEventListener('mouseup', () => {
      if (isDragging) {
        isDragging = false;
        divider.classList.remove('dragging');

        // Re-enable pointer events on the iframe
        const iframe = document.getElementById('target');
        iframe.style.pointerEvents = 'auto';
      }
    });

    // Initialize
    setLayout(
      layoutType,
      splitRatio,
    );
    updateDividerPosition();
  </script>
<