Ah... I just wrote a test page. It works fine in Edge and Chrome but not on MacOs Safari (latest version).
Here is the code for the test page -> the timer is huge just to ensure the entire thing is properly loaded just in case
It seems that Safari stops rendering any iFrame that already has two iFrame parents.
So I'm in trouble now...
Anyone has any idea?
<html>
<head>
<title>iFrame Depth Testing</title>
<script>
const Initialise = () => {
document.body.appendChild(CreateFrames(0, 10));
};
const CreateFrames = (current, max) => {
const iFrame = document.createElement("iframe");
iFrame.style.cssText =
"position:absolute;left:100px;top:100px;width:1000px;height:1000px;";
const title = "Hi! Im IFrame number:" + current;
const testLoad = () => {
if (iFrame.contentDocument && iFrame.contentDocument.body) {
const div = document.createElement("hr");
div.innerHTML = title;
iFrame.contentDocument.body.appendChild(div);
if (current < max) {
iFrame.contentDocument.body.appendChild(CreateFrames(current + 1, max));
}
} else {
setTimeout(testLoad, 1000);
}
};
setTimeout(testLoad, 1000);
return iFrame;
};
</script>
</head>
<body onload="Initialise();"></body>
</html>