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 02:20:27 -0400
Message-ID: <4A655E2B.7040709@mit.edu>
Ian Hickson wrote:
> The change I have checked in makes us more compatible with what IE 
> actually does here, which pages are apparently relying on. We could also 
> make the spec introduce a whole new kind of behaviour, such as the one 
> Jonas described, but that seems just as likely to have compatibility 
> problems as what the spec said before, and also has some weird 
> side-effects, like making it possible for the parser to go through the EOF 
> point more than once, or having odd behaviour around document.close().

The thing is, your behavior also introduces issues as far as I can see 
(e.g. requirements that network loads be performed while a script is 
running without reentering the script, which means not firing any 
progress events associated with those network loads, requirements about 
execution of <script> with src pointing to javascript URIs, if those are 
supported to start with, etc, etc).

It's not clear to me that what you're proposing is any simpler than what 
Jonas is proposing.

Note that the bugs he cited had to do with various problems he brought 
up with the spec text, including but not limited to this one.  Which, if 
any, of them actually require this innerHTML behavior?  From my reading
of the bugs, none of them really do.

I'd be very interested in other implementor feedback here, but it seems 
to me that the current proposal is much more complicated than simply 
saying that document.write in a deferred script never blows away the 
document...  Is that not sufficiently compatible for some reason?

Received on Monday, 20 July 2009 23:20:27 UTC

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