Iframe loading and processing
Having following code
Code:
<iframe id="myframe" src="..."></iframe>
<script>
document.getElementById('myframe').onload = function() {
alert('myframe is loaded');
};
</script>
i wonder how does the browser processes an iframes? Does it load the iframe content in the separate thread? If so is it run synchronously with the main thread?
Re: Iframe loading and processing
If it is getting run in a separate thread, why would it be executed synchronously with the main thread (i.e. why create a separate thread to run a synchronous task)?
Re: Iframe loading and processing
Quote:
Originally Posted by
Arjay
If it is getting run in a separate thread, why would it be executed synchronously with the main thread (i.e. why create a separate thread to run a synchronous task)?
So the answer is that it's run in the one main thread?
Re: Iframe loading and processing
Quote:
Originally Posted by
Mulligan
So the answer is that it's run in the one main thread?
I don't know whether iFrames are run in separate threads (I suspect they may be); however, if they are run in separate threads, it would be doubtful that they would be synchronized with the main thread (because that would defeat the purpose of using a separate thread).
Re: Iframe loading and processing
Older browsers definitely use 1 thread. Most current browsers use 1 process. Chrome does additional tabs & iframes out of process.