Re: ISSUE-36: DOMContentLoaded?

>> It's also not true for <script> nodes added to the DOM via DOM  
>> manipulation while the page is loaded.
> 
> So dropping it would work or perhaps something like:
> 
>   Language specific requirements can make the
>   UA to load certain dependencies first. In
>   HTML all <script> elements in the source
>   tree without the "defer" attribute set have
>   to be loaded for example.
> 
> ... now source tree might need some definition.

As stated in an earlier email, I think it is not immideatly clear to me 
that firing DOMContentLoaded before all scripts have loaded is a good idea.

First of all, I think the distinction DOM-added vs. in-markup <script>s 
is something that authors might have a hard time understanding. For 
example, what does document.write-added scripts count as? What about 
scripts added using .innerHTML? (the latter happens to not execute in 
mozilla right now)

Second, since the defer attribute is ignored by most implementations 
currently (and probably for some time to come) ignore the defer 
attribute. This could mean that users that use that attribute might 
start to depend on such scripts being loaded forcing future UAs to have 
to stall the DOMContentLoaded event until they are loaded anyway.

I would be interested to hear if anyone has any good usecases either way 
on this.

/ Jonas

Received on Tuesday, 7 March 2006 09:03:51 UTC