I have an iframe with the following element in its header
<link type="text/css" rel="stylesheet" href="/web/assets/report.min.css">
The problem is that this style sheet takes more time to load than the iframe. Because of that, the iframe would show without styling for 2 seconds or so.
What I want to do is to hide the iframe and only show it if this style sheet has fully loaded. How can I do this? Can I maybe listen to the url /web/assets/report.min.css
and once it returns status code of 200 I can show the iframe?