I search a solution to check a Cross-Origin iframe content. The problem is, that the iframe load an iframe, and in this iframe is not always loading content. Because of the cross-origin, the iframe content can not be queried. However, it is possible that a blank page is loaded in the iframe. An additional problem is that the iframe has a fixed height and width. So if no content is loaded, then a white area will be displayed in this height and width.
With Javascript I get to the src of the second iframe.
document.getElementsByTagName("iframe")[0].contentDocument.getElementsByTagName("iframe")[0].src;
Unfortunately, I can not get any further. The check should take place via Javascript at the client side. A separate check on the getted url does not help, because the content in the iframe is automatically generated via many factors. Each call may deliver a different content. So with the getted url a check does not work. The visible content needs to be checked in the iframe. If the content is a blank page, then something else should be displayed instead of the iframe, or the iframe should be set to display:none or heigth:0px and width:0px. I have no access to the iframe source and content. How can you do something like that? Please solutions with pure Javascript preferred.
DISCLAIMER: There is not a "access iframe content" question. There is a "check iframe content" question, maybe without read the iframe HTML document content (disallowed by cross origin. I know.).