I'm trying to inject some CSS into an iFrame, and it works fine, except there is a delay before the new CSS takes effect. How can I set priority for iframe CSS? I use this code for the iframe section:
<iframe id="myiFrame" fetchpriority="low" loading="lazy" width="1024px" height="200px" src="mypage.html"></iframe>
And use this code for styling:
<script>
window.onload = function() {
let frameElement = document.getElementById("myiFrame");
let doc = frameElement.contentDocument;
doc.body.innerHTML = doc.body.innerHTML + '<style>.jeg_header_wrapper{display:none!important}</style>';
}
</script>