Skip to content

Commit

Permalink
Attempt to fix Firefox issue
Browse files Browse the repository at this point in the history
  • Loading branch information
krassowski committed Aug 17, 2024
1 parent 16ba768 commit a4a993f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions content/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
iframe {
width: 100%;
height: 100%;
transition: opacity .25s ease-in-out;
}
.code-wrapper {
position: relative;
Expand Down Expand Up @@ -189,7 +190,7 @@ <h2>CDAO AI Assurance Portal</h2>
wrapper.appendChild(spinerWrapper);

wrapper.appendChild(iframe);
iframe.style.display = 'none';
iframe.style.opacity = '0';
iframe.onload = async () => {
if (iframe.contentDocument) {
iframe.contentDocument.head.appendChild(styleSheet);
Expand All @@ -204,7 +205,7 @@ <h2>CDAO AI Assurance Portal</h2>
});
} else {
codeEl.style.display = 'none';
iframe.style.display = 'block';
iframe.style.opacity = '1';
spinerWrapper.style.display = 'none';
}
}
Expand Down

0 comments on commit a4a993f

Please sign in to comment.