• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Iframe loading and the main site.

MulliGan81

Junior Member
Having following code
Code:
<iframe id="myframe" src="..."></iframe>
 
    <script>
    document.getElementById('myframe').onload = function() {
      alert('myframe is loaded');
    };
    </script>
Is it possible that the iframe finish loading before we assign onload handler in the script?
 
There is the defer attribute for the javascript but I just noticed you want to wait until the iframe is done loading, not the page that contains the iframe.
 
There is the defer attribute for the javascript but I just noticed you want to wait until the iframe is done loading, not the page that contains the iframe.
Yes i know the defer attribute but i want to know how does the browser process the code when it hits iframe tag. Does it create and start a new thread for loading and procesing iframe code leaving the main thread processing the main site code independantly?
 
Back
Top