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

Re: ISSUE-36: DOMContentLoaded?

From: Maciej Stachowiak <mjs@apple.com>
Date: Mon, 13 Mar 2006 01:26:31 -0800
Message-Id: <12144AAB-84A8-4524-B4B2-B87B1F7F66A8@apple.com>
Cc: Anne van Kesteren <annevk@opera.com>, "Web APIs WG (public)" <public-webapi@w3.org>
To: Jonas Sicking <jonas@sicking.cc>

On Mar 7, 2006, at 1:03 AM, Jonas Sicking wrote:

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

I think it makes sense to require that all script loads complete.  
It's better for the triggering of this event to be at a well-defined  
time with respect to various delayed script load mechanisms, as  
differing on this could cause compatibility issues.  And "after"  
seems more useful than "before".

Received on Monday, 13 March 2006 09:26:52 UTC

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