JSFiddle - React, Tailwind, and code Playground
HTML
<div id="testFrame" style="width: 640px; height: 480px; border: solid; border-width: thick;"></div>
<input id="reload" type="button" value="Refresh"/>
JavaScript
$(document).ready(function(){
$('#reload').click(function(e){
clickFunction(e, callbackAlert);
});
function clickFunction(event, callback){
event.preventDefault();
$("#testFrame").html('<object id="idObject" width="640" height="480" data="https://jsfiddle.net">');
alert("Hi");
callback();
}
function callbackAlert(){
}
});