   });
            mirroredEle.style.borderColor = 'transparent';

            const parseValue = (v) => v.endsWith('px') ? parseInt(v.slice(0, -2), 10) : 0;
            const borderWidth = parseValue(textareaStyles.borderWidth);

            const ro = new ResizeObserver(() => {
                mirroredEle.style.width = `${textarea.clientWidth + 2 * borderWidth}px`;
                mirroredEle.style.height = `${textarea.clientHeight + 2 * borderWidth}px`;
            });
            ro.observe(textarea);

