There was a problem that the external site that I had to bring as an iframe did not appear with a probability of about 5%. (If you click again, it will appear normally)
I want to retry if there is an error in the external site imported into the iframe. How can I detect that an error has occurred on an external site?
I tried to find the html tag or class name of the external site imported into the iframe but failed.
And the onload function didn't work as expected either. This is because even if I call 'an external site with an error', 'my site' is judged as 'imported'.
Summary: How do I know on my own site that an error occurred on someone else's site that was imported into an iframe? My site judged that 'it was imported normally', so functions such as onerror did not work.
I asked the developer of an external site that imports into an iframe for help. However, he did not know the exact cause.
Differences from this question: SecurityError: Blocked a frame with origin from accessing a cross-origin frame
Normally, it is called normally.
The external site itself occasionally encounters network errors. (not my promblem)
As an analogy, my site shows the YouTube site as an iframe, which is exactly the same as the situation where YouTube's server is unstable and cannot show the video. The YouTube site itself is called normally.