W3C home > Mailing lists > Public > public-webapi@w3.org > March 2006

Re: ISSUE-36: DOMContentLoaded?

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 07 Mar 2006 01:03:45 -0800
Message-ID: <440D4C71.7070308@sicking.cc>
To: Anne van Kesteren <annevk@opera.com>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>

>> 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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:20 UTC