I have two components.
1st components contain a form with textara control, and the 2nd component contains an SVG graph. When user adds more detailed in textarea control and due to that form element get resized, however, I want to detect it to make my SVG graph aligned to that change.
<div id="comp1">
<form action="/action_page.php" id="usrform">
<textarea rows="4" cols="50" name="comment" form="usrform">
Enter text here...</textarea>
</form>
<div>
<div id="comp2">
</div>
I want to detect changes whenever comp1 get resized.
resizeis not available to HTML elements. It is triggered only on window. There is a proposal to make it available to elements as well but its not in yet. Read more developer.mozilla.org/en-US/docs/Web/API/Window/resize_event