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.
Created attachment 246038 [details] Repro for bug
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!
All browsers match. -> Config changed