JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
    <div id="resisableDiv" style="width: 200px; height: 200px;">
    </div>
</body>
</html>

CSS

#resisableDiv {
		   background-color: red;
	   }

JavaScript

(function resizeDiv() {
    if (this === null) {
        return;
    }
    
    alert(this.style.width);
	if(parseInt(this.style.width,10) < 400 && parseInt(this.style.height,10) < 400) {
		this.style.width += 5;
		this.style.height += 5;
    } else if (parseInt(this.style.width,10) > 400 && parseInt(this.style.height,10) > 400) {
		this.style.width -= 5;
		this.style.height -= 5;	   	
	}
	
	//window.setTimeout(resizeDiv.bind(this), 2000);
	
}).call(document.getElementById("resisableDiv"));