I have an iframe inside a angular2 component, and I am trying to change the content of the iframe by accessing the contentWindow. The iframe should contain a simple butt
I solved the problem in the following way:
var ID = document.getElementById("Iframe"); var Iframe = eval("(ID.contentWindow || ID.contentDocument)"); Iframe.CallIframeFunction();