'Angular - How to access iframe content inside a external domain

I'm trying to access an external iframe content inside the parent html, is it possible? I already trying multiple ways to access those content, take a look at my code below:

Trying to access with ViewChild inside onLoad function of the iframe

Code

Result: Result

At this moment looks like a good information, but I need to access the data inside #document tag, so I tried the following code at the ngOnInit function.

NgOnInit Function

Result

So in this case, I can't access the body content tag, how can I do this?

And, my final tried, was with this code Code

Result

With this code I get cross origin error.

My final question is, is it possible access an iframe content in a external domain?

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source