Bug 28783

Summary: Dynamically inserted script elements don't pause JS execution while being loaded
Product: WebKit Reporter: Mikhail <mikhail.v.gavrilov>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: abarth, ap, eric, hsivonen, marcus, rniwa, simonjam, tonyg, vinaur
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
bug example
none
reduced test case
none
reduced test case none

Description Mikhail 2009-08-27 13:41:50 PDT
Created attachment 38682 [details]
bug example

When I Insert on fly JS.
Execution sequence are incorrect.
In all browsers first pop's "event 1", last "event 2".
On browser's based on WebKit (Google Crome & Safari) first pop's "event 2", last "event 1".
This can broke logic of JavaScript program.

Please see attached example on different browser's.
Comment 1 Alexey Proskuryakov 2009-08-31 09:55:38 PDT
Created attachment 38817 [details]
reduced test case

Further reduced test case.
Comment 2 Mikhail 2009-08-31 10:06:39 PDT
Reduced test case don't work because no https://bug-28783-attachments.webkit.org/evt.js file.
Comment 3 Alexey Proskuryakov 2009-08-31 10:13:17 PDT
Created attachment 38819 [details]
reduced test case

Sorry, it still needs two files - uploading an archive.
Comment 4 Alexey Proskuryakov 2009-08-31 10:17:54 PDT
<rdar://problem/7183664>
Comment 5 Alexey Proskuryakov 2009-12-29 22:22:25 PST
*** Bug 33018 has been marked as a duplicate of this bug. ***
Comment 6 Alexey Proskuryakov 2009-12-30 18:04:13 PST
Bug 28328 could be a duplicate, too.
Comment 7 vinaur 2010-11-17 22:27:16 PST
This may be useful for testing. http://dyn-script-load.appspot.com/
Comment 8 Henri Sivonen 2010-12-01 05:13:24 PST
This is a not a bug per HTML5.
Comment 9 James Simonsen 2010-12-02 14:18:07 PST
(In reply to comment #8)
> This is a not a bug per HTML5.

Agreed. See http://dev.w3.org/html5/spec/Overview.html#set-of-scripts-that-will-execute-as-soon-as-possible

This bug should be marked as invalid.