W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2009

[whatwg] scripts, defer, document.write and DOMContentLoaded

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 21 Jul 2009 09:39:13 -0400
Message-ID: <4A65C501.3080809@mit.edu>
Ian Hickson wrote:
>> It's not clear to me that what you're proposing is any simpler than what 
>> Jonas is proposing.
> I agree it's no simpler; I'm saying it's more compatible with IE.

And I'm saying it's incompatible with IE in precisely the way that's 
unacceptable to me as an implementor, I guess.... I'm also not sure that 
the IE compat is important here; we've had no reports of compat issues 
with not doing what IE does.

> I don't really understand what your proposal would actually translate to, 
> in precise spec terms.

I haven't internalized your parsing algorithm rules, but my intuition 
given the one compat requirement I know of here (not blowing away 
documents in cases where IE doesn't blow them away) is that deferred 
scripts should be treated as if the <script> tags appeared in the HTML 
character stream after all the content that is actually there...  That 
is, immediately before the EOF point.

> One alternative would be to make the scripts that have "src" attributes 
> but are deferred be excluded from the innerHTML behaviour, and just have 
> them do the old behaviour

I could probably live with that, for what it's worth, but I'm still 
wondering why we need this innerHTML behavior at all.  innerHTML doesn't 
even run scripts it directly inserts; why would it run some other random 

That said, if for compat we need this I can see doing it...

> But it's less compatible with IE than I usually try to be (I would have 
> specced this innerHTML behaviour long ago if I'd thought to test for it).

Again, what you specced is also incompatible with IE, and the precise 
incompatibility is the issue I (and apparently Maciej) have with it.

Received on Tuesday, 21 July 2009 06:39:13 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:14 UTC