JSFiddle - React, Tailwind, and code Playground
by Neo Aptt
HTML
<iframe id="myframe" src="http://www.w3schools.com"></iframe>
<span id="callback">No Callback</span>
CSS
iframe {
width:100px;
height:100px;
}
JavaScript
//function that happens when loaded
function loaded() {
b.innerHTML = 'Call Back Worked';
};
//gets elements and sets them to variables
var b = document.getElementById('callback')
var a = document.getElementById("myframe");
//listens to load event
a.addEventListener("load", loaded());