JSFiddle - React, Tailwind, and code Playground
HTML
<div id=aDiv></div>
Resize this DIV with your mouse.<br>
Google Chrome console won't show any massage.
CSS
#aDiv {background: gray ; resize: both ; overflow: auto ; width: 200px ; height: 200px}
JavaScript
$(function(){
mutObs = new MutationObserver(function(){
console.log('Hello') ;
}) ;
elem = document.getElementById('aDiv') ;
mutObs.observe(elem,{attributes:true}) ;
elem.style.width = '300px' ; //this fires the observer callback as expected
}) ;