RESOLVED CONFIGURATION CHANGED141254
Script ordering for scripts dynamically inserted is wrong
https://bugs.webkit.org/show_bug.cgi?id=141254
Summary Script ordering for scripts dynamically inserted is wrong
Ryan Molden
Reported 2015-02-04 11:14:34 PST
When scripts are dynamically inserted by another script, via <DOM script node>.parentElement.insertBefore they are run out of order vis-à-vis the statically declared scripts in the HTML file. Repro: Extract attached archive to directory, modify A.js to set the newly created script node's src attribute to the proper path where you extracted the repro files, load test.html in WebKit. Expected: Alert ordering to be "Executing A.js" -> "Executing A1.js" -> "Executing B.js" Actual: Alert ordering is "Executing A.js" -> "Executing B.js" -> "Executing A1.js" In IE ordering is as expected. In Chrome it is the same as WebKit. Not sure who is correct here via the standards, but if there is latitude allowed I think IEs ordering is the most sensible and logical.
Attachments
Repro for bug (989 bytes, application/octet-stream)
2015-02-04 11:15 PST, Ryan Molden
no flags
Ryan Molden
Comment 1 2015-02-04 11:15:31 PST
Created attachment 246038 [details] Repro for bug
Ahmad Saleem
Comment 2 2022-07-30 07:21:19 PDT
I am unable to reproduce this bug in Safari 15.6 based on attached test case, I noticed following behavior across all browsers (Chrome Canary 106 and Firefox Nightly 105): Alert ordering is "Executing A.js" -> "Executing B.js" A1.js does not get loaded at all in any browsers. I am not sure about web-spec but since all browsers are in consensus. Do we need to do more or this can be marked as "RESOLVED WONTFIX" or accordingly anything appropriate. Thanks!
Ryosuke Niwa
Comment 3 2022-07-30 13:23:51 PDT
All browsers match. -> Config changed
Note You need to log in before you can comment on or make changes to this bug.