JSFiddle - React, Tailwind, and code Playground
by mooyah
HTML
<div id="iframecontainer">
</div>
JavaScript
var eContainer = document.getElementById("container"),
eIframe = document.createElement("iframe");
console.log("The top window has a protocol of: " +
window.location.protocol
);
document.getElementById("iframecontainer").appendChild(eIframe);
eIframe.srcdoc = "<html><head><scr" + "ipt>console.log('The iframe\\'s window has a protocol of: ' + window.location.protocol);</scr" + "ipt></head><body><div>The advertisement video plays here</div></body></html>";