I have an iframe in my Angular app. The iframe has an image in base64 format. Now I am trying to get that image’s base64 code and store it in a variable in the parent page/Angular app. Can anyone assist, please? I found this article
How to get data from Iframe with Angular 6
Here is my HTML code for the iframe
<iframe src="http://eohdigitalappstore.co.za/test/test.html"></iframe>
I managed to get a bit further by being able to get elements in the iframe page but am now trying to get to the image in the elements tree
const doc = this.iframe.nativeElement.contentDocument || this.iframe.nativeElement.contentWindow;
console.log(doc.body);
I can get to point in the HTML elements tree which looks like below