JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container"></div>
<br/><br/><br/><br/>
<div id="xx">Not Fired..."</div>

JavaScript

var cnt = 0;
(function loadWidget() {
            var widgetObj = document.createElement("object");
            
            // if set  'block' from the begining - rendered once.
            // Comment next line and it would render twice
            widgetObj.style.display = "block";
            
            widgetObj.data = ("http://13.75.145.9/widgets/dial.html");
            
            var tt = document.getElementById("container");
            tt.appendChild(widgetObj);
            widgetObj.addEventListener("load", widgetLoaded, false);
        })();

    	function widgetLoaded(e) {
        cnt = cnt + 1;
        document.getElementById("xx").innerText = "fired x" + cnt;
        
        const target = e.currentTarget;
        console.log(getComputedStyle(target, null).display);
        
        target.style = "position: absolute; left: 50px;";
        console.log(getComputedStyle(target, null).display);
     	}