css3 resize (listener to event works in ie + ff )

HTML

<div  onresize="OnResize (this);">hi there</div>

CSS

div {
    overflow: auto;
    resize: both;
    background: grey; 
    color: blue;
    height: 50px;
    width: 50px;
}

JavaScript

$('div')[0].addEventListener('DOMAttrModified', function(e){

    a('prevValue: ' + e.prevValue, 'newValue: ' + e.newValue); 
}, false);


$('div').height(100); 


function ChangeSize (){
            var blueDiv = document.getElementById ("blueDiv");
            blueDiv.style.width = "200px";;
            blueDiv.style.height = "100px";;
        }

        function OnResize (blueDiv) {
            var w = blueDiv.offsetWidth;
            var h = blueDiv.offsetHeight;
             console.log("The size of the blue element will change to " + w + " * " + h);
        }