How to get innerHtml in iframe by angular

    <iframe  -sharporbitIframe  [src]="chargeHtml|safe" width="100%" height="100%" frameborder="0" align="center"></iframe>
window.document.body.innerHTML = document.getElementById("orbitIframe").contentWindow.document.getElementsByTagName("body").innerHTML

this prompts contentWindow" does not exist on type "HTMLElement"

Apr.27,2022

const iframe = document.getElementById ('orbitIframe');
const iframeWin = (< HTMLIFrameElement > iframe) .contentWindow;

you can add a < HTMLIFrameElement >, but you probably won't get the data.


should be cross-domain?


then use contentDocument

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bef821-31c86.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bef821-31c86.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?