[Webkit-unassigned] [Bug 28956] New: script appended to HEAD during document load executes after window.onload

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 3 14:00:10 PDT 2009


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

           Summary: script appended to HEAD during document load executes
                    after window.onload
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Page Loading
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ojan at chromium.org
                CC: fishd at chromium.org


In the attached test case, I append two script elements to the head element
during document load and console.log the number of elements loaded as each
script element loads and at window.onload. I get the following on the console:

results.json  Resource interpreted as script but transferred with MIME type
text/html.
race.html:21  Number of loaded results: 1
race.html:25  Number of results at window.onload: 1
results.json  Resource interpreted as script but transferred with MIME type
text/html.
race.html:21  Number of loaded results: 2

The last script element gets executed after window.onload. Unless I'm crazy,
all the script elements should be executed before the onload event fires, no?

I think it might be a race condition that happens to get regularly triggered by
the large size of the script files (~15MB), but that's just a guess.

I tested this in a WebKit nightly and Safari 4 on the Mac. Both have the same
behavior.

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