I know I can use ResizeObserver
to detect when a div's size changes, but I would like to only know when the user resizes the div with the CSS property resize: both
, and not when the page gets resized.
// Detect when user resizes element with the property resize: both;
div {
resize: both;
overflow: auto;
border: 1px solid;
}
<div>
Hi!
</div>