A call to document.write() from an asynchronously-loaded external script was ignored.
Hence change the document.write content to alternate methods like, creating the element using
document.createElement()...and then append it to the page like, document.body.appendChild(element);
var iframeEle = document.createElement("iframe"); iframeEle.setAttribute("src", path); iframeEle.width = width+"px"; iframeEle.height = height+"px"; iframeEle.frameBorder = 0; document.body.appendChild(iframeEle);