[Webkit-unassigned] [Bug 20710] WebKit should support defer and async on script elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 1 10:45:29 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=20710





--- Comment #23 from Tony Gentilcore <tonyg at chromium.org>  2010-06-01 10:45:22 PST ---
(In reply to comment #21)
> It is unfortunate to put this code on Document since it's only needed during parsing.  Tony and I talked in #webkit he said he'd look at the possibility of re-using HTML5ScriptRunner to do this once a first-pass implementation lands as part of bug 39716 (likely tonight).
> 
> I'm not sure we would actually be able to make HTML5ScriptRunner work with the old Tokenizer, but there is also the question of whether we even want to bother fixing this for the soon-to-be-old parser path.  I'm not sure when we'll have the HTML5 parser system ready for prime time though so it may not make sense to block this work either.
> 
> Regardless, the tests he wrote for this are super useful.

I've update the patch to work with the HTML5ScriptRunner. It worked beautifully with defer. However, async is a little different since it needs to block the load event but not parsing or the DCL event. Since async scripts may outlive the parser, the two options I see for tracking pending async scripts are either the Document or the FrameLoader. This patch uses the document for now. Let me know if you think it would be cleaner to move to FrameLoader or if you have an idea for a third option.

Also, I don't have any expectations along with my new layout tests. What is the right procedure to add the expectations?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list