Re: DOMContentLoaded event and iframes

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
On 1/24/10 7:42 PM, WakA wrote:
> I'm not sure I would consider iframe non-DOM content. What's going on
> archtitecturally?

You kick off a network load, just like you do for <img>, <object>, 
<embed>.  When the data arrives it's handled somehow; how depends on the 
exact data.

> Also, http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html.html
> defines an HTMLIFrameElement.

Yes, but I assumed by "non-DOM" you meant "things that don't end up in 
the DOM of the page" (like the data of images, etc).

>> The precise definition of DOMContentLoaded is "when parsing of the
>> page is done".
>
> Which begs the question of when parsing of the page is done?

UA-dependent; typically right after the parser reads the last byte from 
the netowrk stream.  The ordering of this with other network loads is 
undefined (could happen in any order).

> If iframe is just regular DOM then why isn't it counted as such?

What do you mean by "regular dom"?

> When parsing simply wait for all objects parsing an iframe to report
> DOMAllContentLoaded (or use another faster method internally), then let
> it issue a DOMAllContentLoaded itself.

So just like onload but blocking on a smaller set of events, presumably. 
  Which events?  All <iframe>s and <object>s?  What about <embed>?  What 
about <img src="something.svg">?

-Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.