[Bug 9843] Specced behavior for document.write("<link rel=stylesheet href=...><script>...</script>...") matches none of the top 4 engines

http://www.w3.org/Bugs/Public/show_bug.cgi?id=9843





--- Comment #4 from Ian 'Hixie' Hickson <ian@hixie.ch>  2010-09-25 19:11:27 ---
(In reply to comment #2)
> The spec says "yielding control back to the caller" in that case, which is what
> Gecko does, but AFAICT, the spec yields the control back to the caller
> depending on whether an external style sheet has loaded. This seems bad.

Well it's not great, sure, but in practice what's the worst that could happen?
It's not like the style sheet is going to completely load before the event loop
spins anyway, right? I could make this explicit if you like.

Making things depend on where the "<" came from or some such seems like adding
yet more hacks to an already particularly large pile of hacks. Given that
there's no interop here, I'd really rather just do the minimum required to be
compatible with legacy content and have the design be somewhat sane.

Also note that there are no nested event loops here. The parser just blocks and
returns control to the event loop until the style sheet is ready, it doesn't
nest the event loop (unless you implement it that way, but that would be bad,
as you point out).

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Saturday, 25 September 2010 19:11:29 UTC