[whatwg] scripts, defer, document.write and DOMContentLoaded
mjs at apple.com
Tue Jul 21 00:32:55 PDT 2009
On Jul 20, 2009, at 7:30 PM, Boris Zbarsky wrote:
> Ian Hickson wrote:
>> Actually what's going on is more subtle than that. When you set
>> innerHTML, it's actually triggering the deferred scripts right
>> there, if it has them loaded (e.g. inline scripts or cached
>> scripts). If it doesn't have them loaded yet, it drops them on the
>> floor and doesn't ever run them.
>> I've specced this, except that the spec requires that not-yet-
>> loaded scripts be loaded then run, rather than dropped, before
>> innerHTML continues, so there's no race conditions.
> Er... wait. So innerHTML has to block on network access? And
> possibly spin the event loop as it does so?
> This doesn't seem desirable to me.... Why do we want this behavior?
innerHTML blocking on network access seems seriously problematic to
me. I don't think blocking the UI is preferable to a race condition,
when we are talking about a compatibility quirk for content doing
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg