I have an iFrame, where I want to send a JavaScript command after loading. My current code looks like this:
document.querySelector("iframe").addEventListener( "load", function(e) { this.style.backgroundColor = "red"; alert(this.nodeName); console.log(e.target); } );