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